diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/channels.cpp | 17 | ||||
-rwxr-xr-x | src/svn-rev.sh | 2 |
2 files changed, 11 insertions, 8 deletions
diff --git a/src/channels.cpp b/src/channels.cpp index 41759f2e2..819195871 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -447,16 +447,19 @@ chanrec* ForceChan(chanrec* Ptr,ucrec *a,userrec* user, int created) a->channel = Ptr; Ptr->AddUser(user); WriteChannel(Ptr,user,"JOIN :%s",Ptr->name); - log(DEBUG,"Sent JOIN to client"); - if (Ptr->topicset) + /* Major improvement by Brain - we dont need to be calculating all this pointlessly for remote users */ + if (IS_LOCAL(user)) { - WriteServ(user->fd,"332 %s %s :%s", user->nick, Ptr->name, Ptr->topic); - WriteServ(user->fd,"333 %s %s %s %lu", user->nick, Ptr->name, Ptr->setby, (unsigned long)Ptr->topicset); + log(DEBUG,"Sent JOIN to client"); + if (Ptr->topicset) + { + WriteServ(user->fd,"332 %s %s :%s", user->nick, Ptr->name, Ptr->topic); + WriteServ(user->fd,"333 %s %s %s %lu", user->nick, Ptr->name, Ptr->setby, (unsigned long)Ptr->topicset); + } + userlist(user,Ptr); + WriteServ(user->fd,"366 %s %s :End of /NAMES list.", user->nick, Ptr->name); } - - userlist(user,Ptr); - WriteServ(user->fd,"366 %s %s :End of /NAMES list.", user->nick, Ptr->name); FOREACH_MOD(I_OnUserJoin,OnUserJoin(user,Ptr)); return Ptr; } diff --git a/src/svn-rev.sh b/src/svn-rev.sh index 4a44fddeb..972734b6c 100755 --- a/src/svn-rev.sh +++ b/src/svn-rev.sh @@ -1 +1 @@ -echo 3648 +echo 3651 |