diff options
-rw-r--r-- | src/InspIRCd.layout | 20 | ||||
-rw-r--r-- | src/inspircd.cpp | 54 |
2 files changed, 39 insertions, 35 deletions
diff --git a/src/InspIRCd.layout b/src/InspIRCd.layout index fd2b099c3..fc6034805 100644 --- a/src/InspIRCd.layout +++ b/src/InspIRCd.layout @@ -13,9 +13,9 @@ LeftChar=1 [Editor_1] Open=1 Top=1 -CursorCol=34 -CursorRow=456 -TopLine=404 +CursorCol=1 +CursorRow=3257 +TopLine=3234 LeftChar=1 [Editor_2] @@ -67,11 +67,11 @@ TopLine=6 LeftChar=1 [Editor_8] -Open=0 +Open=1 Top=0 CursorCol=1 CursorRow=1 -TopLine=38 +TopLine=1 LeftChar=1 [Editor_9] @@ -165,8 +165,8 @@ LeftChar=1 [Editor_20] Open=1 Top=0 -CursorCol=1 -CursorRow=314 +CursorCol=4 +CursorRow=308 TopLine=285 LeftChar=1 @@ -211,7 +211,7 @@ LeftChar=1 [Editor_26] Open=1 Top=0 -CursorCol=2 -CursorRow=30 -TopLine=1 +CursorCol=19 +CursorRow=51 +TopLine=28 LeftChar=1 diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 3f4de91d1..062a07995 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -3235,40 +3235,44 @@ void handle_quit(char **parameters, int pcnt, userrec *user) { user_hash::iterator iter = clientlist.find(user->nick); - /* theres more to do here, but for now just close the socket */ - if (pcnt == 1) + if (user->registered == 7) { - if (parameters[0][0] == ':') + /* theres more to do here, but for now just close the socket */ + if (pcnt == 1) + { + if (parameters[0][0] == ':') + { + *parameters[0]++; + } + Write(user->fd,"ERROR :Closing link (%s@%s) [%s]",user->ident,user->host,parameters[0]); + WriteOpers("*** Client exiting: %s!%s@%s [%s]",user->nick,user->ident,user->host,parameters[0]); + WriteCommonExcept(user,"QUIT :%s%s",PrefixQuit,parameters[0]); + } + else { - *parameters[0]++; + Write(user->fd,"ERROR :Closing link (%s@%s) [QUIT]",user->ident,user->host); + WriteOpers("*** Client exiting: %s!%s@%s [Client exited]",user->nick,user->ident,user->host); + WriteCommonExcept(user,"QUIT :Client exited"); } - Write(user->fd,"ERROR :Closing link (%s@%s) [%s]",user->ident,user->host,parameters[0]); - WriteOpers("*** Client exiting: %s!%s@%s [%s]",user->nick,user->ident,user->host,parameters[0]); - WriteCommonExcept(user,"QUIT :%s%s",PrefixQuit,parameters[0]); - } - else - { - Write(user->fd,"ERROR :Closing link (%s@%s) [QUIT]",user->ident,user->host); - WriteOpers("*** Client exiting: %s!%s@%s [Client exited]",user->nick,user->ident,user->host); - WriteCommonExcept(user,"QUIT :Client exited"); + FOREACH_MOD OnUserQuit(user); + AddWhoWas(user); } - FOREACH_MOD OnUserQuit(user); - - /* confucious say, he who close nonblocking socket, get nothing! */ - Blocking(user->fd); - close(user->fd); - NonBlocking(user->fd); - AddWhoWas(user); - + /* push the socket on a stack of sockets due to be closed at the next opportunity */ + fd_reap.push_back(user->fd); + if (iter != clientlist.end()) { - log(DEBUG,"deleting user hash value"); - delete iter->second; + log(DEBUG,"deleting user hash value %d",iter->second); + if ((iter->second) && (user->registered == 7)) { + delete iter->second; + } clientlist.erase(iter); } - - purge_empty_chans(); + + if (user->registered == 7) { + purge_empty_chans(); + } } void handle_who(char **parameters, int pcnt, userrec *user) |