* @param user The user to verify
* @return True if all modules have finished checking this user
*/
- bool AllModulesReportReady(User* user);
+ bool AllModulesReportReady(LocalUser* user);
/** Logfile pathname specified on the commandline, or empty string
*/
/** If you change the module API in any way, increment this value.
* This MUST be a pure integer, with no parenthesis
*/
-#define API_VERSION 136
+#define API_VERSION 137
class ServerConfig;
I_OnUserPostNick, I_OnPreMode, I_On005Numeric, I_OnKill, I_OnRemoteKill, I_OnLoadModule,
I_OnUnloadModule, I_OnBackgroundTimer, I_OnPreCommand, I_OnCheckReady, I_OnCheckInvite,
I_OnRawMode, I_OnCheckKey, I_OnCheckLimit, I_OnCheckBan, I_OnCheckChannelBan, I_OnExtBanCheck,
- I_OnStats, I_OnChangeLocalUserHost, I_OnChangeLocalUserGecos, I_OnPreTopicChange,
+ I_OnStats, I_OnChangeLocalUserHost, I_OnPreTopicChange,
I_OnPostTopicChange, I_OnEvent, I_OnGlobalOper, I_OnPostConnect, I_OnAddBan,
I_OnDelBan, I_OnChangeLocalUserGECOS, I_OnUserRegister, I_OnChannelPreDelete, I_OnChannelDelete,
I_OnPostOper, I_OnSyncNetwork, I_OnSetAway, I_OnUserList, I_OnPostCommand, I_OnPostJoin,
* The details of the connecting user are available to you in the parameter User *user
* @param user The user who is connecting
*/
- virtual void OnUserConnect(User* user);
+ virtual void OnUserConnect(LocalUser* user);
/** Called when a user quits.
* The details of the exiting user are available to you in the parameter User *user
* which might assign resources to user, such as dns lookups, objects and sockets.
* @param user The user who is disconnecting
*/
- virtual void OnUserDisconnect(User* user);
+ virtual void OnUserDisconnect(LocalUser* user);
/** Called whenever a channel is about to be deleted
* @param chan The channel being deleted
* @param user The user to check
* @return true to indicate readiness, false if otherwise
*/
- virtual ModResult OnCheckReady(User* user);
+ virtual ModResult OnCheckReady(LocalUser* user);
/** Called whenever a user is about to register their connection (e.g. before the user
* is sent the MOTD etc). Modules can use this method if they are performing a function
* @param user The user registering
* @return 1 to indicate user quit, 0 to continue
*/
- virtual ModResult OnUserRegister(User* user);
+ virtual ModResult OnUserRegister(LocalUser* user);
/** Called whenever a user joins a channel, to determine if invite checks should go ahead or not.
* This method will always be called for each join, wether or not the channel is actually +i, and
* @param newhost The new hostname
* @return 1 to deny the host change, 0 to allow
*/
- virtual ModResult OnChangeLocalUserHost(User* user, const std::string &newhost);
+ virtual ModResult OnChangeLocalUserHost(LocalUser* user, const std::string &newhost);
/** Called whenever a change of a local users GECOS (fullname field) is attempted.
* return 1 to deny the name change, or 0 to allow it.
* @param newhost The new GECOS
* @return 1 to deny the GECOS change, 0 to allow
*/
- virtual ModResult OnChangeLocalUserGECOS(User* user, const std::string &newhost);
+ virtual ModResult OnChangeLocalUserGECOS(LocalUser* user, const std::string &newhost);
/** Called before a topic is changed.
* Return 1 to deny the topic change, 0 to check details on the change, -1 to let it through with no checks
if (user->registered == REG_NICKUSER)
{
/* user is registered now, bit 0 = USER command, bit 1 = sent a NICK command */
- FIRST_MOD_RESULT(OnUserRegister, MOD_RESULT, (user));
+ FIRST_MOD_RESULT(OnUserRegister, MOD_RESULT, (IS_LOCAL(user)));
if (MOD_RESULT == MOD_RES_DENY)
return CMD_FAILURE;
* the same way, however, they can be fully unloaded, where these
* may not.
*/
-class CommandUser : public Command
+class CommandUser : public SplitCommand
{
public:
/** Constructor for user.
*/
- CommandUser ( Module* parent) : Command(parent,"USER",4,4) { works_before_reg = true; Penalty = 0; syntax = "<username> <localhost> <remotehost> <GECOS>"; }
+ CommandUser ( Module* parent) : SplitCommand(parent,"USER",4,4) { works_before_reg = true; Penalty = 0; syntax = "<username> <localhost> <remotehost> <GECOS>"; }
/** Handle command.
* @param parameters The parameters to the comamnd
* @param pcnt The number of parameters passed to teh command
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
+ CmdResult HandleLocal(const std::vector<std::string>& parameters, LocalUser *user);
};
-CmdResult CommandUser::Handle (const std::vector<std::string>& parameters, User *user)
+CmdResult CommandUser::HandleLocal(const std::vector<std::string>& parameters, LocalUser *user)
{
/* A user may only send the USER command once */
if (!(user->registered & REG_USER))
* (until this returns true, a user will block in the waiting state, waiting to connect up to the
* registration timeout maximum seconds)
*/
-bool InspIRCd::AllModulesReportReady(User* user)
+bool InspIRCd::AllModulesReportReady(LocalUser* user)
{
ModResult res;
FIRST_MOD_RESULT(OnCheckReady, res, (user));
}
ModResult Module::OnSendSnotice(char &snomask, std::string &type, const std::string &message) { return MOD_RES_PASSTHRU; }
-void Module::OnUserConnect(User*) { }
+void Module::OnUserConnect(LocalUser*) { }
void Module::OnUserQuit(User*, const std::string&, const std::string&) { }
-void Module::OnUserDisconnect(User*) { }
+void Module::OnUserDisconnect(LocalUser*) { }
void Module::OnUserJoin(Membership*, bool, bool, CUList&) { }
void Module::OnPostJoin(Membership*) { }
void Module::OnUserPart(Membership*, std::string&, CUList&) { }
void Module::OnBackgroundTimer(time_t) { }
ModResult Module::OnPreCommand(std::string&, std::vector<std::string>&, User *, bool, const std::string&) { return MOD_RES_PASSTHRU; }
void Module::OnPostCommand(const std::string&, const std::vector<std::string>&, User *, CmdResult, const std::string&) { }
-ModResult Module::OnCheckReady(User*) { return MOD_RES_PASSTHRU; }
-ModResult Module::OnUserRegister(User*) { return MOD_RES_PASSTHRU; }
+ModResult Module::OnCheckReady(LocalUser*) { return MOD_RES_PASSTHRU; }
+ModResult Module::OnUserRegister(LocalUser*) { return MOD_RES_PASSTHRU; }
ModResult Module::OnUserPreKick(User*, Membership*, const std::string&) { return MOD_RES_PASSTHRU; }
void Module::OnUserKick(User*, Membership*, const std::string&, CUList&) { }
ModResult Module::OnRawMode(User*, Channel*, const char, const std::string &, bool, int) { return MOD_RES_PASSTHRU; }
ModResult Module::OnCheckBan(User*, Channel*, const std::string&) { return MOD_RES_PASSTHRU; }
ModResult Module::OnExtBanCheck(User*, Channel*, char) { return MOD_RES_PASSTHRU; }
ModResult Module::OnStats(char, User*, string_list&) { return MOD_RES_PASSTHRU; }
-ModResult Module::OnChangeLocalUserHost(User*, const std::string&) { return MOD_RES_PASSTHRU; }
-ModResult Module::OnChangeLocalUserGECOS(User*, const std::string&) { return MOD_RES_PASSTHRU; }
+ModResult Module::OnChangeLocalUserHost(LocalUser*, const std::string&) { return MOD_RES_PASSTHRU; }
+ModResult Module::OnChangeLocalUserGECOS(LocalUser*, const std::string&) { return MOD_RES_PASSTHRU; }
ModResult Module::OnPreTopicChange(User*, Channel*, const std::string&) { return MOD_RES_PASSTHRU; }
void Module::OnEvent(Event&) { }
void Module::OnRequest(Request&) { }
}
}
- virtual ModResult OnUserRegister(User* user)
+ virtual ModResult OnUserRegister(LocalUser* user)
{
- /* only do lookups on local users */
- if (IS_LOCAL(user))
+ const char* c = GeoIP_country_code_by_addr(gi, user->GetIPString());
+ if (c)
{
- const char* c = GeoIP_country_code_by_addr(gi, user->GetIPString());
- if (c)
- {
- std::map<std::string, std::string>::iterator x = GeoBans.find(c);
- if (x != GeoBans.end())
- ServerInstance->Users->QuitUser(user, x->second);
- }
- else
- {
- if (banunknown)
- ServerInstance->Users->QuitUser(user, "Could not identify your country of origin. Access denied.");
- }
+ std::map<std::string, std::string>::iterator x = GeoBans.find(c);
+ if (x != GeoBans.end())
+ ServerInstance->Users->QuitUser(user, x->second);
+ }
+ else
+ {
+ if (banunknown)
+ ServerInstance->Users->QuitUser(user, "Could not identify your country of origin. Access denied.");
}
return MOD_RES_PASSTHRU;
}
return true;
}
- ModResult OnUserRegister(User* user)
+ ModResult OnUserRegister(LocalUser* user)
{
if ((!allowpattern.empty()) && (InspIRCd::Match(user->nick,allowpattern)))
{
}
}
- ModResult OnCheckReady(User* user)
+ ModResult OnCheckReady(LocalUser* user)
{
return ldapAuthed.get(user) ? MOD_RES_PASSTHRU : MOD_RES_DENY;
}
{
// This occurs AFTER OnUserConnect so we can be sure the
// protocol module has propagated the NICK message.
- if (user->GetIOHook() == this && (IS_LOCAL(user)))
+ if (user->GetIOHook() == this)
{
if (sessions[user->GetFd()].sess)
{
return MOD_RES_PASSTHRU;
}
- virtual ModResult OnUserRegister(User* user)
+ virtual ModResult OnUserRegister(LocalUser* user)
{
user->WriteNumeric(439, "%s :This server has anti-spambot mechanisms enabled.", user->nick.c_str());
user->WriteNumeric(931, "%s :Malicious bots, spammers, and other automated systems of dubious origin are NOT welcome here.", user->nick.c_str());
ServerInstance->Modules->Attach(eventlist, this, 1);
}
- ModResult OnCheckReady(User* user)
+ ModResult OnCheckReady(LocalUser* user)
{
/* Users in CAP state get held until CAP END */
if (cmd.reghold.get(user))
}
}
- virtual ModResult OnUserRegister(User* user)
+ virtual ModResult OnUserRegister(LocalUser* user)
{
for(CGIHostlist::iterator iter = cmd.Hosts.begin(); iter != cmd.Hosts.end(); iter++)
{
return MOD_RES_PASSTHRU;
}
- virtual void OnUserConnect(User* user)
+ virtual void OnUserConnect(LocalUser* user)
{
std::string *webirc_hostname = cmd.webirc_hostname.get(user);
std::string *webirc_ip = cmd.webirc_ip.get(user);
std::string* cloak = ext.get(dest);
- if (!cloak)
+ if (!cloak && IS_LOCAL(dest))
{
/* Force creation of missing cloak */
- creator->OnUserConnect(dest);
+ creator->OnUserConnect(IS_LOCAL(dest));
cloak = ext.get(dest);
}
if (cloak)
}
}
- void OnUserConnect(User* dest)
+ void OnUserConnect(LocalUser* dest)
{
std::string* cloak = cu.ext.get(dest);
if (cloak)
return Version("Forces users to join the specified channel(s) on connect", VF_VENDOR);
}
- virtual void OnPostConnect(User* user)
+ void OnPostConnect(User* user)
{
if (!IS_LOCAL(user))
return;
-
for(std::vector<std::string>::iterator it = Joinchans.begin(); it != Joinchans.end(); it++)
if (ServerInstance->IsChannel(it->c_str(), ServerInstance->Config->Limits.ChanMax))
Channel::JoinUser(user, it->c_str(), false, "", false, ServerInstance->Time());
return Version("Sets (and unsets) modes on users when they connect", VF_VENDOR);
}
- virtual void OnUserConnect(User* user)
+ virtual void OnUserConnect(LocalUser* user)
{
- if (!IS_LOCAL(user))
- return;
-
// Backup and zero out the disabled usermodes, so that we can override them here.
char save[64];
memcpy(save, ServerInstance->Config->DisabledUModes,
return out;
}
- ModResult OnUserRegister(User* user)
+ ModResult OnUserRegister(LocalUser* user)
{
std::string pingrpl = RandString();
return MOD_RES_PASSTHRU;
}
- ModResult OnCheckReady(User* user)
+ ModResult OnCheckReady(LocalUser* user)
{
return ext.get(user) ? MOD_RES_DENY : MOD_RES_PASSTHRU;
}
banduration = ServerInstance->Duration(duration);
}
- virtual void OnUserConnect(User *u)
+ virtual void OnUserConnect(LocalUser *u)
{
int range = 32;
clonemap::iterator i;
first = ServerInstance->Time();
}
- virtual ModResult OnUserRegister(User* user)
+ virtual ModResult OnUserRegister(LocalUser* user)
{
time_t next = ServerInstance->Time();
class DNSBLResolver : public Resolver
{
int theirfd;
- User* them;
+ LocalUser* them;
DNSBLConfEntry *ConfEntry;
public:
- DNSBLResolver(Module *me, const std::string &hostname, User* u, int userfd, DNSBLConfEntry *conf, bool &cached)
+ DNSBLResolver(Module *me, const std::string &hostname, LocalUser* u, int userfd, DNSBLConfEntry *conf, bool &cached)
: Resolver(hostname, DNS_QUERY_A, cached, me)
{
theirfd = userfd;
ReadConf();
}
- virtual ModResult OnUserRegister(User* user)
+ virtual ModResult OnUserRegister(LocalUser* user)
{
- /* only do lookups on local users */
- if (IS_LOCAL(user))
- {
- /* following code taken from bopm, reverses an IP address. */
- struct in_addr in;
- unsigned char a, b, c, d;
- char reversedipbuf[128];
- std::string reversedip;
- bool success;
+ /* following code taken from bopm, reverses an IP address. */
+ struct in_addr in;
+ unsigned char a, b, c, d;
+ char reversedipbuf[128];
+ std::string reversedip;
+ bool success;
- success = inet_aton(user->GetIPString(), &in);
+ success = inet_aton(user->GetIPString(), &in);
- if (!success)
- return MOD_RES_PASSTHRU;
+ if (!success)
+ return MOD_RES_PASSTHRU;
- d = (unsigned char) (in.s_addr >> 24) & 0xFF;
- c = (unsigned char) (in.s_addr >> 16) & 0xFF;
- b = (unsigned char) (in.s_addr >> 8) & 0xFF;
- a = (unsigned char) in.s_addr & 0xFF;
+ d = (unsigned char) (in.s_addr >> 24) & 0xFF;
+ c = (unsigned char) (in.s_addr >> 16) & 0xFF;
+ b = (unsigned char) (in.s_addr >> 8) & 0xFF;
+ a = (unsigned char) in.s_addr & 0xFF;
- snprintf(reversedipbuf, 128, "%d.%d.%d.%d", d, c, b, a);
- reversedip = std::string(reversedipbuf);
+ snprintf(reversedipbuf, 128, "%d.%d.%d.%d", d, c, b, a);
+ reversedip = std::string(reversedipbuf);
- // For each DNSBL, we will run through this lookup
- for (std::vector<DNSBLConfEntry *>::iterator i = DNSBLConfEntries.begin(); i != DNSBLConfEntries.end(); i++)
- {
- // Fill hostname with a dnsbl style host (d.c.b.a.domain.tld)
- std::string hostname = reversedip + "." + (*i)->domain;
+ // For each DNSBL, we will run through this lookup
+ for (std::vector<DNSBLConfEntry *>::iterator i = DNSBLConfEntries.begin(); i != DNSBLConfEntries.end(); i++)
+ {
+ // Fill hostname with a dnsbl style host (d.c.b.a.domain.tld)
+ std::string hostname = reversedip + "." + (*i)->domain;
- /* now we'd need to fire off lookups for `hostname'. */
- bool cached;
- DNSBLResolver *r = new DNSBLResolver(this, hostname, user, user->GetFd(), *i, cached);
- ServerInstance->AddResolver(r, cached);
- }
+ /* now we'd need to fire off lookups for `hostname'. */
+ bool cached;
+ DNSBLResolver *r = new DNSBLResolver(this, hostname, user, user->GetFd(), *i, cached);
+ ServerInstance->AddResolver(r, cached);
}
/* don't do anything with this hot potato */
return Version("Provides masking of user hostnames in a different way to m_cloaking", VF_VENDOR);
}
- virtual void OnUserConnect(User* iuser)
+ virtual void OnUserConnect(LocalUser* user)
{
- LocalUser* user = (LocalUser*)iuser;
for (hostchanges_t::iterator i = hostchanges.begin(); i != hostchanges.end(); i++)
{
if (((InspIRCd::MatchCIDR(user->MakeHost(), i->first)) || (InspIRCd::MatchCIDR(user->MakeHostIP(), i->first))))
RequestTimeout = 5;
}
- virtual ModResult OnUserRegister(User *user)
+ virtual ModResult OnUserRegister(LocalUser *user)
{
ConfigTag* tag = user->MyClass->config;
if (!tag->getBool("useident", true))
* creating a Timer object and especially better than creating a
* Timer per ident lookup!
*/
- virtual ModResult OnCheckReady(User *user)
+ virtual ModResult OnCheckReady(LocalUser *user)
{
/* Does user have an ident socket attached at all? */
IdentRequestSocket *isock = ext.get(user);
{
/* Module unloading, tidy up users */
if (target_type == TYPE_USER)
- OnUserDisconnect((User*)item);
+ OnUserDisconnect((LocalUser*)item);
}
- virtual void OnUserDisconnect(User *user)
+ virtual void OnUserDisconnect(LocalUser *user)
{
/* User disconnect (generic socket detatch event) */
IdentRequestSocket *isock = ext.get(user);
if (m && adding)
m->OnUserQuit(dest, "Connection closed", "Connection closed");
- /* This has to come after setting/unsetting the handler */
- if (m && !adding)
- m->OnPostConnect(dest);
-
/* User appears to vanish or appear from nowhere */
for (UCListIter f = dest->chans.begin(); f != dest->chans.end(); f++)
{
{
}
- virtual ModResult OnUserRegister(User* user)
+ virtual ModResult OnUserRegister(LocalUser* user)
{
if (js.port && js.redirect_new_users)
{
ResetLocked();
}
- virtual ModResult OnUserRegister(User* user)
+ virtual ModResult OnUserRegister(LocalUser* user)
{
if (locked)
{
return MOD_RES_PASSTHRU;
}
- virtual ModResult OnCheckReady(User* user)
+ virtual ModResult OnCheckReady(LocalUser* user)
{
return locked ? MOD_RES_DENY : MOD_RES_PASSTHRU;
}
return Version("Provides random Quotes on Connect.",VF_VENDOR);
}
- virtual void OnUserConnect(User* user)
+ virtual void OnUserConnect(LocalUser* user)
{
cmd.Handle(std::vector<std::string>(), user);
}
return Version("RLINE: Regexp user banning.", VF_COMMON | VF_VENDOR);
}
- virtual void OnUserConnect(User* user)
+ virtual void OnUserConnect(LocalUser* user)
{
// Apply lines on user connect
XLine *rl = ServerInstance->XLines->MatchesLine("R", user);
ServerInstance->Logs->Log("m_sasl", DEFAULT, "WARNING: m_services_account.so and m_cap.so are not loaded! m_sasl.so will NOT function correctly until these two modules are loaded!");
}
- ModResult OnUserRegister(User *user)
+ ModResult OnUserRegister(LocalUser *user)
{
SaslAuthenticator *sasl_ = authExt.get(user);
if (sasl_)
affectopers = MyConf.ReadFlag("shun", "affectopers", "no", 0);
}
- virtual void OnUserConnect(User* user)
+ virtual void OnUserConnect(LocalUser* user)
{
if (!IS_LOCAL(user))
return;
{
I_OnPreCommand, I_OnGetServerDescription, I_OnUserInvite, I_OnPostTopicChange,
I_OnWallops, I_OnUserNotice, I_OnUserMessage, I_OnBackgroundTimer, I_OnUserJoin,
- I_OnChangeLocalUserHost, I_OnChangeName, I_OnChangeIdent, I_OnUserPart, I_OnUnloadModule,
+ I_OnChangeHost, I_OnChangeName, I_OnChangeIdent, I_OnUserPart, I_OnUnloadModule,
I_OnUserQuit, I_OnUserPostNick, I_OnUserKick, I_OnRemoteKill, I_OnRehash, I_OnPreRehash,
I_OnOper, I_OnAddLine, I_OnDelLine, I_OnMode, I_OnLoadModule, I_OnStats,
I_OnSetAway, I_OnPostCommand, I_OnUserConnect
DoConnectTimeout(curtime);
}
-void ModuleSpanningTree::OnUserConnect(User* user)
+void ModuleSpanningTree::OnUserConnect(LocalUser* user)
{
if (user->quitting)
return;
}
}
-ModResult ModuleSpanningTree::OnChangeLocalUserHost(User* user, const std::string &newhost)
+void ModuleSpanningTree::OnChangeHost(User* user, const std::string &newhost)
{
- if (user->registered != REG_ALL)
- return MOD_RES_PASSTHRU;
+ if (user->registered != REG_ALL || !IS_LOCAL(user))
+ return;
parameterlist params;
params.push_back(newhost);
Utils->DoOneToMany(user->uuid,"FHOST",params);
- return MOD_RES_PASSTHRU;
}
void ModuleSpanningTree::OnChangeName(User* user, const std::string &gecos)
{
- // only occurs for local clients
- if (user->registered != REG_ALL)
+ if (user->registered != REG_ALL || !IS_LOCAL(user))
return;
parameterlist params;
ModResult OnPreCommand(std::string &command, std::vector<std::string>& parameters, User *user, bool validated, const std::string &original_line);
void OnPostCommand(const std::string &command, const std::vector<std::string>& parameters, User *user, CmdResult result, const std::string &original_line);
void OnGetServerDescription(const std::string &servername,std::string &description);
- void OnUserConnect(User* source);
+ void OnUserConnect(LocalUser* source);
void OnUserInvite(User* source,User* dest,Channel* channel, time_t);
void OnPostTopicChange(User* user, Channel* chan, const std::string &topic);
void OnWallops(User* user, const std::string &text);
void OnUserMessage(User* user, void* dest, int target_type, const std::string &text, char status, const CUList &exempt_list);
void OnBackgroundTimer(time_t curtime);
void OnUserJoin(Membership* memb, bool sync, bool created, CUList& excepts);
- ModResult OnChangeLocalUserHost(User* user, const std::string &newhost);
+ void OnChangeHost(User* user, const std::string &newhost);
void OnChangeName(User* user, const std::string &gecos);
void OnChangeIdent(User* user, const std::string &ident);
void OnUserPart(Membership* memb, std::string &partmessage, CUList& excepts);
verbose = Conf.ReadFlag("sqlauth", "verbose", 0); /* Set to true if failed connects should be reported to operators */
}
- ModResult OnUserRegister(User* user)
+ ModResult OnUserRegister(LocalUser* user)
{
if ((!allowpattern.empty()) && (InspIRCd::Match(user->nick,allowpattern)))
{
}
}
- ModResult OnCheckReady(User* user)
+ ModResult OnCheckReady(LocalUser* user)
{
return sqlAuthed.get(user) ? MOD_RES_PASSTHRU : MOD_RES_DENY;
}
return MOD_RES_PASSTHRU;
}
- virtual void OnUserConnect(User* user)
+ virtual void OnUserConnect(LocalUser* user)
{
AddLogEntry(LT_CONNECT,user->nick,user->host,user->server);
}
}
}
- void OnUserDisconnect(User* user)
+ void OnUserDisconnect(LocalUser* user)
{
/* A user is disconnecting, first we need to check if they have a list of queries associated with them.
* Then, if they do, we need to erase each of them from our IdUserMap (iduser) so when the module that
user->WriteCommonQuit(reason, oper_reason);
}
- FOREACH_MOD(I_OnUserDisconnect,OnUserDisconnect(user));
-
if (user->registered != REG_ALL)
if (ServerInstance->Users->unregistered_count)
ServerInstance->Users->unregistered_count--;
if (IS_LOCAL(user))
{
+ FOREACH_MOD(I_OnUserDisconnect,OnUserDisconnect(IS_LOCAL(user)));
user->DoWrite();
if (user->GetIOHook())
{
if (IS_LOCAL(this))
{
ModResult MOD_RESULT;
- FIRST_MOD_RESULT(OnChangeLocalUserGECOS, MOD_RESULT, (this,gecos));
+ FIRST_MOD_RESULT(OnChangeLocalUserGECOS, MOD_RESULT, (IS_LOCAL(this),gecos));
if (MOD_RESULT == MOD_RES_DENY)
return false;
FOREACH_MOD(I_OnChangeName,OnChangeName(this,gecos));
if (IS_LOCAL(this))
{
ModResult MOD_RESULT;
- FIRST_MOD_RESULT(OnChangeLocalUserHost, MOD_RESULT, (this,shost));
+ FIRST_MOD_RESULT(OnChangeLocalUserHost, MOD_RESULT, (IS_LOCAL(this),shost));
if (MOD_RESULT == MOD_RES_DENY)
return false;
}