From f82f00034a60281cc63b2fecec15f87084af2a68 Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 3 Apr 2004 21:53:48 +0000 Subject: Topic and stability fixes git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@368 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 47504f0cc..409dd10ab 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -3100,14 +3100,13 @@ void handle_topic(char **parameters, int pcnt, userrec *user) } else { - WriteServ(user->fd,"331 %s %s :No topic is set.", user->nick, Ptr->name); + WriteServ(user->fd,"401 %s %s :No suck nick/channel",user->nick, parameters[0]); } } + return; } else if (pcnt>1) { - if (loop_call(handle_topic,parameters,pcnt,user,0,pcnt-2,0)) - return; if (strlen(parameters[0]) <= CHANMAX) { Ptr = FindChan(parameters[0]); @@ -3120,7 +3119,7 @@ void handle_topic(char **parameters, int pcnt, userrec *user) } char topic[MAXBUF]; - strncpy(topic,parameters[2],MAXBUF); + strncpy(topic,parameters[1],MAXBUF); if (strlen(topic)>MAXTOPIC) { topic[MAXTOPIC-1] = '\0'; @@ -4541,7 +4540,7 @@ void SetupCommandTable(void) createcommand("PART",handle_part,0,1); createcommand("KICK",handle_kick,0,2); createcommand("MODE",handle_mode,0,1); - createcommand("TOPIC",handle_topic,0,2); + createcommand("TOPIC",handle_topic,0,1); createcommand("WHO",handle_who,0,1); createcommand("MOTD",handle_motd,0,0); createcommand("RULES",handle_join,0,0); -- cgit v1.2.3