* Handled CHANNEL_CHANGE notify (ignore it) in Irssi SILC
client. Affected file irssi/src/silc/core/client_ops.c.
+ * Merged with Irssi 0.8.4 from irssi.org CVS.
+
Thu Mar 14 12:53:57 CET 2002 Pekka Riikonen <priikone@silcnet.org>
* Check for valid socket connection in client entries before
fi
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(Irssi-SILC, 0.8.2)
+AM_INIT_AUTOMAKE(Irssi-SILC, 0.8.4+)
AM_MAINTAINER_MODE
<ul>
<li>How do I make F1 key do something?</li>
</ul></li>
-<li><a href="#c10">Proxies and IRC bouncers</a></li>
+<li><a href="#c10">Proxies and IRC bouncers</a>
+ <ul>
+ <li>What's this irssi-proxy?</li>
+ </ul></li>
<li><a href="#c11">Irssi's settings</a></li>
<li><a href="#c12">Statusbar</a>
<ul>
<strong>--with-proxy</strong> option to configure. You'll still need to run
irssi in a screen to use it though.</p>
-<p>Irssi proxy is a bit different than most proxies, normally proxies create
-a new connection to IRC server when you connect to it, but with irssi proxy
-all the clients use the same IRC server connection (a bit like how screen -x
-works).</p>
+<p>Irssi proxy is a bit different than most proxies, normally proxies
+create a new connection to IRC server when you connect to it, but
+<strong>irssi proxy shares your existing IRC connection(s) to multiple
+clients</strong>.</p>
<p>Irssi proxy supports sharing multiple server connections in different
ports, like you can share ircnet in port 2777 and efnet in port 2778.</p>
int len;
/* skip any of the prefixes.. */
- while (*prefixes != NULL) {
- len = strlen(*prefixes);
- if (strncmp(name, *prefixes, len) == 0 && name[len] == '_') {
- name += len+1;
- break;
+ if (prefixes != NULL) {
+ while (*prefixes != NULL) {
+ len = strlen(*prefixes);
+ if (strncmp(name, *prefixes, len) == 0 &&
+ name[len] == '_') {
+ name += len+1;
+ break;
+ }
+ prefixes++;
}
- prefixes++;
}
/* skip the _core part */
{
signal_emit("nicklist remove", 2, channel, nick);
+ if (channel->ownnick == nick)
+ channel->ownnick = NULL;
+
/*MODULE_DATA_DEINIT(nick);*/
g_free(nick->nick);
g_free_not_null(nick->realname);
} else {
/* pick the one that was found, or if both do it like
/SET resolve_prefer_ipv6 says. */
- ip = iprec.ip6.family != 0 &&
- settings_get_bool("resolve_prefer_ipv6") ?
+ ip = iprec.ip4.family == 0 ||
+ (iprec.ip6.family != 0 &&
+ settings_get_bool("resolve_prefer_ipv6")) ?
&iprec.ip6 : &iprec.ip4;
}
window_bind_add(window_item_window(chanrec),
chanrec->server->tag, chanrec->name);
- /* FIXME: kludgy kludgy... and it relies on channel not
- being destroyed immediately.. */
+ /* FIXME: kludgy kludgy... */
signal_emit("command part", 3, data, server, item);
- chanrec->left = TRUE;
- channel_destroy(chanrec);
+
+ if (g_slist_find(channels, chanrec) != NULL) {
+ chanrec->left = TRUE;
+ channel_destroy(chanrec);
+ }
server->channels_join(server, joindata, FALSE);
g_free(joindata);
format_create_dest_tag(&dest, query->server, query->server_tag,
query->name, MSGLEVEL_CLIENTNOTICE, NULL);
- printformat_dest(&dest, TXT_NICK_CHANGED, oldnick,
- query->name, query->name);
+
+ /* don't print the nick change message if only the case was changed */
+ if (g_strcasecmp(query->name, oldnick) != 0) {
+ printformat_dest(&dest, TXT_NICK_CHANGED, oldnick,
+ query->name, query->name);
+ }
signal_emit("window item changed", 2,
window_item_window((WI_ITEM_REC *) query), query);
GSList *tmp;
/* prefer active window if possible */
- if (WINDOW_LEVEL_MATCH(active_win, server, level))
+ if (active_win != NULL &&
+ WINDOW_LEVEL_MATCH(active_win, server, level))
return active_win;
for (tmp = windows; tmp != NULL; tmp = tmp->next) {
{ "chan_not_found", "Not joined to such channel", 0 },
{ "chan_not_synced", "Channel not fully synchronized yet, try again after a while", 0 },
{ "illegal_proto", "Command isn't designed for the chat protocol of the active server", 0 },
- { "not_good_idea", "Doing this is not a good idea. Add -YES if you really mean it", 0 },
+ { "not_good_idea", "Doing this is not a good idea. Add -YES option to command if you really mean it", 0 },
/* ---- */
{ NULL, "Themes", 0 },
char *str, *tmp;
g_return_if_fail(dest != NULL);
- g_return_if_fail(dest->window != NULL);
g_return_if_fail(text != NULL);
+ if (dest->window == NULL) {
+ str = strip_codes(text);
+ printf("NO WINDOWS: %s\n", str);
+ g_free(str);
+ return;
+ }
+
msg_beep_check(dest);
if ((dest->level & MSGLEVEL_NEVER) == 0)
char *color; /* background color */
int real_ypos; /* real Y-position in screen at the moment */
- int dirty:1;
+ unsigned int dirty:1;
int dirty_xpos; /* -1 = only redraw some items, >= 0 = redraw all items after from xpos */
} STATUSBAR_REC;
int xpos, size;
int current_size; /* item size currently in screen */
- int dirty:1;
+ unsigned int dirty:1;
};
extern GSList *statusbar_groups;
int term_init(void)
{
- struct sigaction act;
+ struct sigaction act;
+ int width, height;
last_fg = last_bg = -1;
last_attrs = 0;
if (current_term == NULL)
return FALSE;
+ if (term_get_size(&width, &height)) {
+ current_term->width = width;
+ current_term->height = height;
+ }
+
/* grab CONT signal */
sigemptyset(&act.sa_mask);
act.sa_flags = 0;
static int force_colors;
static int resize_dirty;
-/* Resize the terminal if needed */
-void term_resize_dirty(void)
+int term_get_size(int *width, int *height)
{
#ifdef TIOCGWINSZ
struct winsize ws;
+
+ /* Get new window size */
+ if (ioctl(0, TIOCGWINSZ, &ws) < 0)
+ return FALSE;
+
+ *width = ws.ws_col;
+ *height = ws.ws_row;
+
+ if (*width < MIN_SCREEN_WIDTH)
+ *width = MIN_SCREEN_WIDTH;
+ if (*height < 1)
+ *height = 1;
+ return TRUE;
+#else
+ return FALSE;
#endif
+}
+
+/* Resize the terminal if needed */
+void term_resize_dirty(void)
+{
int width, height;
if (!resize_dirty)
resize_dirty = FALSE;
-#ifdef TIOCGWINSZ
- /* Get new window size */
- if (ioctl(0, TIOCGWINSZ, &ws) < 0)
- return;
+ if (!term_get_size(&width, &height))
+ width = height = -1;
- if (ws.ws_row == term_height && ws.ws_col == term_width) {
- /* Same size, abort. */
- return;
+ if (height != term_height || width != term_width) {
+ term_resize(width, height);
+ mainwindows_resize(term_width, term_height);
+ term_resize_final(width, height);
}
-
- if (ws.ws_col < MIN_SCREEN_WIDTH)
- ws.ws_col = MIN_SCREEN_WIDTH;
-
- width = ws.ws_col;
- height = ws.ws_row;
-#else
- width = height = -1;
-#endif
- term_resize(width, height);
- mainwindows_resize(term_width, term_height);
- term_resize_final(width, height);
}
#ifdef SIGWINCH
int term_init(void);
void term_deinit(void);
+/* Gets the current terminal size, returns TRUE if ok. */
+int term_get_size(int *width, int *height);
+
/* Resize terminal - if width or height is negative,
the new size is unknown and should be figured out somehow */
void term_resize(int width, int height);
term->move(term, 0, y1);
for (i = count; i < 0; i++)
tput(tparm(term->TI_ri));
- tput(tparm(term->TI_rin, -count, -count));
}
/* reset the scrolling region to full screen */
done
clean-generic:
- for dir in $(perl_dirs); do rm -f $$dir/Makefile; done
+ for dir in $(perl_dirs); do \
+ cd $$dir; \
+ $(MAKE) clean; \
+ cd ..; \
+ done
distclean-generic:
for dir in $(perl_dirs); do \
old = active_win;
active_win = window;
perl_command(cmd, window->active_server, window->active);
- active_win = old;
+ if (g_slist_find(windows, old) != NULL)
+ active_win = old;
void
window_item_add(window, item, automatic)