summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-03 21:53:48 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2004-04-03 21:53:48 +0000
commitf82f00034a60281cc63b2fecec15f87084af2a68 (patch)
treec180fa01562dc878aff057aff01b484f1eed7dc4
parent8441fc9e2e84838bdb5c3cb7a14c6a41a35467bc (diff)
Topic and stability fixes
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@368 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/inspircd.cpp9
1 files 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);