diff options
| author | 2005-04-15 19:29:20 +0000 | |
|---|---|---|
| committer | 2005-04-15 19:29:20 +0000 | |
| commit | 517dd987a78aafda52057f1f6b763a278e3384b2 (patch) | |
| tree | c9d4894203c0ac7f5ae30aa433f275e2a6f7efcd /src/commands.cpp | |
| parent | Fixed a minor parameter bug (display glitch, wrong censor word in an error) (diff) | |
Added new API methods:
int Module::OnRawMode(userrec* user, char mode, std::string param, bool adding, int pcnt);
int Module::OnCheckInvite(userrec* user, chanrec* chan);
int Module::OnCheckKey(userrec* user, chanrec* chan, std::string keygiven);
int Module::OnCheckLimit(userrec* user, chanrec* chan);
int Module::OnCheckBan(userrec* user, chanrec* chan);
void Module::OnStats(char symbol);
int Module::OnChangeLocalUserHost(userrec* user, std::string newhost);
int Module::OnChangeLocalUserGECOS(userrec* user, std::string newhost);
int Module::OnLocalTopicChange(userrec* user, chanrec* chan, std::string topic);
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1105 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/commands.cpp')
| -rw-r--r-- | src/commands.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/commands.cpp b/src/commands.cpp index 635000974..3a30a3972 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -542,14 +542,22 @@ void handle_topic(char **parameters, int pcnt, userrec *user) WriteServ(user->fd,"482 %s %s :You must be at least a half-operator to change modes on this channel", user->nick, Ptr->name); return; } - + char topic[MAXBUF]; strlcpy(topic,parameters[1],MAXBUF); if (strlen(topic)>MAXTOPIC) { topic[MAXTOPIC-1] = '\0'; } - + + if (!strcasecmp(user->server,ServerName)) + { + int MOD_RESULT = 0; + FOREACH_RESULT(OnLocalTopicChange(user,Ptr,topic)); + if (MOD_RESULT) + return; + } + strlcpy(Ptr->topic,topic,MAXBUF); strlcpy(Ptr->setby,user->nick,NICKMAX); Ptr->topicset = TIME; @@ -1301,6 +1309,8 @@ void handle_stats(char **parameters, int pcnt, userrec *user) } + FOREACH_MOD OnStats(*parameters[0]); + if (!strcasecmp(parameters[0],"c")) { for (int i = 0; i < ConfValueEnum("link",&config_f); i++) |
