X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodes%2Fumode_s.cpp;h=4b3179001af415419eb14950628f1ba05720bdd8;hb=02ccf82812a189c46d0495580b7d96ada34851b5;hp=0c005f56a6d69bd93bf62eda56b7d0a7a9b3d1ae;hpb=3f389a4bd951cbf6f8ca139473647eaae0447322;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modes/umode_s.cpp b/src/modes/umode_s.cpp index 0c005f56a..4b3179001 100644 --- a/src/modes/umode_s.cpp +++ b/src/modes/umode_s.cpp @@ -1,10 +1,23 @@ +/* +------------------------------------+ + * | Inspire Internet Relay Chat Daemon | + * +------------------------------------+ + * + * InspIRCd: (C) 2002-2007 InspIRCd Development Team + * See: http://www.inspircd.org/wiki/index.php/Credits + * + * This program is free but copyrighted software; see + * the file COPYING for details. + * + * --------------------------------------------------- + */ + #include "inspircd.h" #include "mode.h" #include "channels.h" #include "users.h" #include "modes/umode_s.h" -ModeUserServerNotice::ModeUserServerNotice() : ModeHandler('s', 0, 0, false, MODETYPE_USER, false) +ModeUserServerNotice::ModeUserServerNotice(InspIRCd* Instance) : ModeHandler(Instance, 's', 0, 0, false, MODETYPE_USER, false) { } @@ -18,9 +31,15 @@ ModeAction ModeUserServerNotice::OnModeChange(userrec* source, userrec* dest, ch if (dest->modes[UM_SERVERNOTICE] != adding) { dest->modes[UM_SERVERNOTICE] = adding; + this->count += (adding ? 1: -1); return MODEACTION_ALLOW; } /* Allow the change */ return MODEACTION_DENY; } + +unsigned int ModeUserServerNotice::GetCount() +{ + return count; +}