summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornion@aurora <unknown>2007-06-22 13:40:24 +0200
committernion@aurora <unknown>2007-06-22 13:40:24 +0200
commitfcef69cf32b83dbe2e013e094fe5ee6c02c6fb51 (patch)
treeb478d44dfb8a6486193f905337bc6d53d8e65ba8
parentab89c0c4f51e6b22ec6ba254e753b8b4a91a2096 (diff)
downloadii-fcef69cf32b83dbe2e013e094fe5ee6c02c6fb51.zip
ii-fcef69cf32b83dbe2e013e094fe5ee6c02c6fb51.tar.gz
ii-fcef69cf32b83dbe2e013e094fe5ee6c02c6fb51.tar.bz2
enabled joining channels with password
-rw-r--r--ii.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ii.c b/ii.c
index f0c9dcc..d7858f4 100644
--- a/ii.c
+++ b/ii.c
@@ -237,10 +237,11 @@ static void proc_channels_input(Channel *c, char *buf) {
p = strchr(&buf[3], ' ');
if(p) *p = 0;
if((buf[3]=='#')||(buf[3]=='&')||(buf[3]=='+')||(buf[3]=='!')){
- snprintf(message, PIPE_BUF, "JOIN %s\r\n", &buf[3]);
+ if(p) snprintf(message, PIPE_BUF, "JOIN %s %s\r\n", &buf[3], p + 1);
+ else snprintf(message, PIPE_BUF, "JOIN %s\r\n", &buf[3]);
add_channel(&buf[3]);
}
- else{
+ else {
if(p){
add_channel(&buf[3]);
proc_channels_privmsg(&buf[3], p + 1);