X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_invisible.cpp;h=b903941647d60bd6e9c97fb3d695c1c0b01d091e;hb=89fc6ca9c66198fe54cce19d59279cd454fc1bd0;hp=30935c1dd4951cf96fcd781cab803ecbca3ceca3;hpb=ece985ccb3210a132d67381511642edfb359f5c4;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_invisible.cpp b/src/modules/m_invisible.cpp index 30935c1dd..b90394164 100644 --- a/src/modules/m_invisible.cpp +++ b/src/modules/m_invisible.cpp @@ -47,13 +47,13 @@ class InvisibleMode : public ModeHandler ~InvisibleMode() { - for (user_hash::iterator i = ServerInstance->clientlist->begin(); i != ServerInstance->clientlist->end(); i++) + for (user_hash::iterator i = ServerInstance->Users->clientlist->begin(); i != ServerInstance->Users->clientlist->end(); i++) if (i->second->Visibility == qo) i->second->Visibility = NULL; delete qo; } - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool) { if (source != dest) return MODEACTION_DENY; @@ -74,7 +74,7 @@ class InvisibleMode : public ModeHandler if (!ok) { - source->WriteServ("481 %s :Permission Denied - You do not have access to become invisible via user mode +Q", source->nick); + source->WriteNumeric(481, "%s :Permission Denied - You do not have access to become invisible via user mode +Q", source->nick); return MODEACTION_DENY; } @@ -114,9 +114,9 @@ class InvisibleMode : public ModeHandler i->first->WriteServ("MODE %s +%s", f->first->name, n.c_str()); } } - - ServerInstance->SNO->WriteToSnoMask('A', "\2NOTICE\2: Oper %s has become %svisible (%sQ)", dest->GetFullHost(), adding ? "in" : "", adding ? "+" : "-"); } + + ServerInstance->SNO->WriteToSnoMask('A', "\2NOTICE\2: Oper %s has become %svisible (%sQ)", dest->GetFullHost(), adding ? "in" : "", adding ? "+" : "-"); return MODEACTION_ALLOW; } else @@ -135,7 +135,7 @@ class InvisibleDeOper : public ModeWatcher { } - bool BeforeMode(User* source, User* dest, Channel* channel, std::string ¶m, bool adding, ModeType type) + bool BeforeMode(User* source, User* dest, Channel* channel, std::string ¶m, bool adding, ModeType type, bool) { /* Users who are opers and have +Q get their +Q removed when they deoper */ if ((!adding) && (dest->IsModeSet('Q'))) @@ -166,7 +166,7 @@ class ModuleInvisible : public Module throw ModuleException("Could not add new mode watcher on usermode +o!"); /* Yeah i know people can take this out. I'm not about to obfuscate code just to be a pain in the ass. */ - ServerInstance->ServerNoticeAll("*** m_invisible.so has just been loaded on this network. For more information, please visit http://inspircd.org/wiki/Modules/invisible"); + ServerInstance->Users->ServerNoticeAll("*** m_invisible.so has just been loaded on this network. For more information, please visit http://inspircd.org/wiki/Modules/invisible"); Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_OnUserJoin, I_OnUserPart, I_OnUserQuit, I_OnRehash }; ServerInstance->Modules->Attach(eventlist, this, 6); } @@ -182,7 +182,7 @@ class ModuleInvisible : public Module virtual Version GetVersion() { - return Version(1, 1, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION); + return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION); } @@ -245,7 +245,7 @@ class ModuleInvisible : public Module User* target = (User*)dest; if(target->IsModeSet('Q') && !*user->oper) { - user->WriteServ("401 %s %s :No such nick/channel",user->nick, target->nick); + user->WriteNumeric(401, "%s %s :No such nick/channel",user->nick, target->nick); return 1; } } @@ -258,7 +258,7 @@ class ModuleInvisible : public Module } /* Fix by Eric @ neowin.net, thanks :) -- Brain */ - void WriteCommonFrom(User *user, Channel* channel, const char* text, ...) + void WriteCommonFrom(User *user, Channel* channel, const char* text, ...) CUSTOM_PRINTF(4,5) { va_list argsPtr; char textbuffer[MAXBUF];