X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_devoice.cpp;h=b4ba9f117db2374ef982d2da6998b214cb636736;hb=fea1a27cb96a114f698eedcf90401b78406108fb;hp=f3df12cd876fb7447ec03b7022c1855a071557ee;hpb=63cd46d0c0bdae3ee4e4bc0fde186d309add2fcf;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_devoice.cpp b/src/modules/m_devoice.cpp index f3df12cd8..b4ba9f117 100644 --- a/src/modules/m_devoice.cpp +++ b/src/modules/m_devoice.cpp @@ -26,19 +26,21 @@ using namespace std; #include #include "users.h" #include "channels.h" +#include "helperfuncs.h" #include "modules.h" -Server *Srv; +static Server *Srv; class cmd_devoice : public command_t { public: - cmd_devoice () : command_t("DEVOICE", 0, 2) + cmd_devoice () : command_t("DEVOICE", 0, 1) { this->source = "m_devoice.so"; + syntax = ""; } - void Handle (char **parameters, int pcnt, userrec *user) + void Handle (const char** parameters, int pcnt, userrec *user) { /* * NOTE: DO NOT CODE LIKE THIS!!! This has no checks and can send @@ -46,12 +48,12 @@ class cmd_devoice : public command_t * * - I'm not aware what checking I need, so for now... be supreme evil. */ - char* modes[3]; - modes[0] = parameters[0]; - modes[1] = "-v"; - modes[2] = user->nick; + const char* modes[3]; + modes[0] = parameters[0]; + modes[1] = "-v"; + modes[2] = user->nick; - Srv->SendMode(modes,3,user); + Srv->SendMode(modes,3,user); } };