]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - modules/core/m_message.c
Allow /ojoin !#channel/%#channel, if admin/halfop are enabled.
[irc/rqf/shadowircd.git] / modules / core / m_message.c
index d615e8bca815d49aa95da2830a02397503ffa0ce..6e8ba99df8ef3e3ac18c720fa51fdcba0cb8723b 100644 (file)
@@ -362,7 +362,7 @@ build_target_list(int p_or_n, const char *command, struct Client *client_p,
 
                                msptr = find_channel_membership(chptr, source_p);
 
-                               if(!IsServer(source_p) && !IsService(source_p) && !is_chanop_voiced(msptr) && !IsOverride(source_p))
+                               if(!IsServer(source_p) && !IsService(source_p) && !is_chanop_voiced(msptr))
                                {
                                        sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED),
                                                   get_id(&me, source_p),
@@ -485,7 +485,7 @@ msg_channel(int p_or_n, const char *command,
 {
        int result;
        char text2[BUFSIZE];
-       int contor;
+       size_t contor;
        int caps = 0;
        int len = 0;
        struct membership *msptr = find_channel_membership(chptr, source_p);
@@ -501,7 +501,7 @@ msg_channel(int p_or_n, const char *command,
        if(chptr->mode.mode & MODE_NOREPEAT)
        {
                rb_strlcpy(text2, text, BUFSIZE);
-               strip_colour(text2);
+               strip_unprintable(text2);
                md = channel_metadata_find(chptr, "NOREPEAT");
                if(md && (!ConfigChannel.exempt_cmode_K || !is_any_op(msptr)))
                {
@@ -539,9 +539,11 @@ msg_channel(int p_or_n, const char *command,
                {
                        if (strlen(text) > 10 && chptr->mode.mode & MODE_NOCAPS && (!ConfigChannel.exempt_cmode_G || !is_any_op(msptr)))
                        {
-                               for(contor=0; contor < strlen(text); contor++)
+                               rb_strlcpy(text2, text, BUFSIZE);
+                               strip_unprintable(text2);
+                               for(contor=0; contor < strlen(text2); contor++)
                                {
-                                       if(IsUpper(text[contor]) && !isdigit(text[contor]))
+                                       if(IsUpper(text2[contor]) && !isdigit(text2[contor]))
                                                caps++; 
                                        len++;
                                }
@@ -885,7 +887,7 @@ flood_attack_client(int p_or_n, struct Client *source_p, struct Client *target_p
         * and msg user@server.
         * -- jilles
         */
-       if(GlobalSetOptions.floodcount && IsClient(source_p) && source_p != target_p && !IsService(target_p))
+       if(GlobalSetOptions.floodcount && IsClient(source_p) && source_p != target_p && !IsService(target_p) && (!IsOper(source_p) || !ConfigFileEntry.true_no_oper_flood))
        {
                if((target_p->first_received_message_time + 1) < rb_current_time())
                {
@@ -940,7 +942,7 @@ flood_attack_channel(int p_or_n, struct Client *source_p, struct Channel *chptr,
 {
        int delta;
 
-       if(GlobalSetOptions.floodcount && MyClient(source_p))
+       if(GlobalSetOptions.floodcount && MyClient(source_p) && (!IsOper(source_p) || !ConfigFileEntry.true_no_oper_flood))
        {
                if((chptr->first_received_message_time + 1) < rb_current_time())
                {