- Srv->AddCommand("GLOBOPS",handle_globops,'o',1);
- }
-
- virtual ~ModuleGlobops()
- {
- delete Srv;
- }
-
- virtual Version GetVersion()
- {
- return Version(1,0,0,1);
- }
-
- virtual int OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list ¶ms)
- {
- // check if this is our mode character...
- if ((modechar == 'g') && (type == MT_CLIENT))
- {
- // we dont actually do anything with the mode in this module -
- // just tell the core its been claimed and is ok to give users.
- return 1;
+
+ if (c->HasUser(user))
+ {
+ user->WriteNumeric(480, "%s :Can't KNOCK on %s, you are already on that channel.", user->nick.c_str(), c->name.c_str());
+ return CMD_FAILURE;