diff options
| author | dequis <dx@dxzone.com.ar> | 2016-12-27 14:24:50 -0300 | 
|---|---|---|
| committer | dequis <dx@dxzone.com.ar> | 2016-12-27 14:24:50 -0300 | 
| commit | 7801298f6a855cda0c62433d45ec717d2773ef73 (patch) | |
| tree | 0c7cfab0f55843c0f216ff7cb6130804adae4e34 /irc_im.c | |
| parent | 9cdcef077ed523966f508a3721944a16425734cb (diff) | |
Per-account handle_unknown
Credit for the idea goes to russian XMPP spammers. Thanks!
Diffstat (limited to 'irc_im.c')
| -rw-r--r-- | irc_im.c | 7 | 
1 files changed, 4 insertions, 3 deletions
| @@ -88,11 +88,12 @@ static gboolean bee_irc_user_new(bee_t *bee, bee_user_t *bu)  	str_reject_chars(iu->host, " ", '_');  	if (bu->flags & BEE_USER_LOCAL) { -		char *s = set_getstr(&bee->set, "handle_unknown"); +		char *s = set_getstr(&bu->ic->acc->set, "handle_unknown") ? : +		          set_getstr(&bee->set, "handle_unknown"); -		if (strcmp(s, "add_private") == 0) { +		if (g_strcasecmp(s, "add_private") == 0) {  			iu->last_channel = NULL; -		} else if (strcmp(s, "add_channel") == 0) { +		} else if (g_strcasecmp(s, "add_channel") == 0) {  			iu->last_channel = irc->default_channel;  		}  	} | 
