added user registered event, tidied up helper functions and added automatic auth...
[NeonServV5.git] / src / cmd_neonspam_set.c
index 3403e456c467d0afb7929be660114a23ea5f495e..799045c0ab70c8e002cbed1820f50b5c849c6bc3 100644 (file)
@@ -139,7 +139,7 @@ CMD_BIND(neonspam_cmd_set) {
     int i, j;
     if(argc && !strcmp(argv[0], "defaults")) {
         //reset channel settings
-        int uaccess = getChannelAccess(user, chan, 0);
+        int uaccess = getChannelAccess(user, chan);
         if(uaccess < 500) {
             if(isGodMode(user)) {
                 event->flags |= CMDFLAG_OPLOG;
@@ -297,7 +297,7 @@ static char* neonspam_cmd_set_trigger(struct ClientSocket *client, struct UserNo
     row = mysql_fetch_row(res);
     trigger = row[0];
     if(argument) {
-        int uaccess = getChannelAccess(user, chan, 0);
+        int uaccess = getChannelAccess(user, chan);
         if(uaccess < 500) {
             if(isGodMode(user)) {
                 event->flags |= CMDFLAG_OPLOG;
@@ -345,7 +345,7 @@ static char* neonspam_cmd_setexcept(struct ClientSocket *client, struct UserNode
             reply(getTextBot(), user, "NS_INVALID_ACCESS", caccess);
             return NULL;
         }
-        int uaccess = getChannelAccess(user, chan, 0);
+        int uaccess = getChannelAccess(user, chan);
         if(uaccess == 500) uaccess++;
         if(value > uaccess) {
             if(isGodMode(user)) {
@@ -613,7 +613,7 @@ static char* neonspam_cmd_setscanexcept(struct ClientSocket *client, struct User
             reply(getTextBot(), user, "NS_INVALID_ACCESS", caccess);
             return NULL;
         }
-        int uaccess = getChannelAccess(user, chan, 0);
+        int uaccess = getChannelAccess(user, chan);
         if(uaccess == 500) uaccess++;
         if(identical && value > uaccess) {
             if(isGodMode(user)) {