diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-15 19:29:20 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-15 19:29:20 +0000 |
commit | 517dd987a78aafda52057f1f6b763a278e3384b2 (patch) | |
tree | c9d4894203c0ac7f5ae30aa433f275e2a6f7efcd /src/message.cpp | |
parent | 157ee45b8e75d948279af8895a623ff11e4a5d69 (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/message.cpp')
-rw-r--r-- | src/message.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/message.cpp b/src/message.cpp index c2ac34d88..ba1590f8e 100644 --- a/src/message.cpp +++ b/src/message.cpp @@ -57,6 +57,8 @@ extern int MODCOUNT; extern std::vector<Module*> modules; extern std::vector<ircd_module*> factory; +extern char ServerName[MAXBUF]; + extern time_t TIME; extern FILE *log_file; @@ -248,6 +250,13 @@ bool hasumode(userrec* user, char mode) void ChangeName(userrec* user, const char* gecos) { + if (!strcasecmp(user->server,ServerName)) + { + int MOD_RESULT = 0; + FOREACH_RESULT(OnChangeLocalUserGECOS(user,gecos)); + if (MOD_RESULT) + return; + } strlcpy(user->fullname,gecos,MAXBUF); char buffer[MAXBUF]; snprintf(buffer,MAXBUF,"a %s :%s",user->nick,gecos); @@ -256,6 +265,13 @@ void ChangeName(userrec* user, const char* gecos) void ChangeDisplayedHost(userrec* user, const char* host) { + if (!strcasecmp(user->server,ServerName)) + { + int MOD_RESULT = 0; + FOREACH_RESULT(OnChangeLocalUserHost(user,host)); + if (MOD_RESULT) + return; + } strlcpy(user->dhost,host,160); char buffer[MAXBUF]; snprintf(buffer,MAXBUF,"b %s %s",user->nick,host); |