]> jfr.im git - solanum.git/blobdiff - modules/core/m_nick.c
Replace most checks for +o with oper:general
[solanum.git] / modules / core / m_nick.c
index ec57b93a97e52cab5828cf201941e0d6f0b92251..00f8f6f6e1258b5b1dbbe06d203eb9228c77a6e2 100644 (file)
@@ -122,7 +122,7 @@ mr_nick(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_
        struct Client *target_p;
        char nick[NICKLEN];
 
-       if (strlen(client_p->id) == 3)
+       if (strlen(client_p->id) == 3 || (source_p->preClient && !EmptyString(source_p->preClient->id)))
        {
                exit_client(client_p, client_p, client_p, "Mixing client and server protocol");
                return;
@@ -624,7 +624,7 @@ change_local_nick(struct Client *client_p, struct Client *source_p,
        struct Channel *chptr;
        char note[NICKLEN + 10];
        int samenick;
-       hook_data hook_info;
+       hook_cdata hook_info;
 
        if (dosend)
        {
@@ -642,7 +642,7 @@ change_local_nick(struct Client *client_p, struct Client *source_p,
                source_p->localClient->last_nick_change = rb_current_time();
                source_p->localClient->number_of_nick_changes++;
 
-               if(ConfigFileEntry.anti_nick_flood && !IsOper(source_p) &&
+               if(ConfigFileEntry.anti_nick_flood && !IsOperGeneral(source_p) &&
                                source_p->localClient->number_of_nick_changes > ConfigFileEntry.max_nick_changes)
                {
                        sendto_one(source_p, form_str(ERR_NICKTOOFAST),
@@ -731,7 +731,7 @@ change_remote_nick(struct Client *client_p, struct Client *source_p,
 {
        struct nd_entry *nd;
        int samenick = irccmp(source_p->name, nick) ? 0 : 1;
-       hook_data hook_info;
+       hook_cdata hook_info;
 
        /* client changing their nick - dont reset ts if its same */
        if(!samenick)