1
0
Эх сурвалжийг харах

* Testing new +bitch code

svn: 1363
Bryan Drewery 21 жил өмнө
parent
commit
bce463f49e

+ 4 - 0
misc/responses.txt

@@ -39,6 +39,10 @@
  whoa... what a hacker... skills!
  whoa... what a hacker... skills!
  yes! yes! yes! hit me baby one more time!
  yes! yes! yes! hit me baby one more time!
  with your skills, you're better off jacking off than hijacking
  with your skills, you're better off jacking off than hijacking
+:bitchop
+ channel is +bitch
+:bitchopped
+ you dont have op access here
 :manualop
 :manualop
  you think you're special?
  you think you're special?
  naughty kid
  naughty kid

+ 17 - 9
src/mod/irc.mod/mode.c

@@ -461,19 +461,27 @@ got_op(struct chanset_t *chan, memberlist *m, memberlist *mv)
 
 
   /* I'm opped, and the opper isn't me, and it isn't a server op */
   /* I'm opped, and the opper isn't me, and it isn't a server op */
   if (m && me_op(chan) && !match_my_nick(mv->nick)) {
   if (m && me_op(chan) && !match_my_nick(mv->nick)) {
-    /* Channis is +bitch, and the opper isn't a global master or a bot */
     /* deop if they are +d or it is +bitch */
     /* deop if they are +d or it is +bitch */
     if (reversing || chk_deop(victim) || (!loading && userlist && channel_bitch(chan) && !chk_op(victim, chan))) {     /* chk_op covers +private */
     if (reversing || chk_deop(victim) || (!loading && userlist && channel_bitch(chan) && !chk_op(victim, chan))) {     /* chk_op covers +private */
-/*      char outbuf[101] = ""; */
+      int num = randint(10);
+      char outbuf[101] = ""; 
+
+      if (num == 4) {
+        sprintf(outbuf, "MODE %s -o %s\n", chan->name, mv->nick);
+      } else if (num == 5) {
+        sprintf(outbuf, "MODE %s -o %s\n", chan->name, m->nick);
+      } else if (num == 6) {
+        sprintf(outbuf, "KICK %s %s :%s\n", chan->name, mv->nick, response(RES_BITCHOPPED));
+      } else if (num == 7) {
+        sprintf(outbuf, "KICK %s %s :%s\n", chan->name, m->nick, response(RES_BITCHOP));
+      } else
+        add_mode(chan, '-', 'o', mv->nick);
 
 
-      /* if (target_priority(chan, m, 1)) */
-/*        dprintf(DP_MODE, "MODE %s -o %s\n", chan->name, who); */
-      add_mode(chan, '-', 'o', mv->nick);
-//      flush_mode(chan, QUICK);
-/*      sprintf(outbuf, "MODE %s -o %s\n", chan->name, who);
-      tputs(serv, outbuf, strlen(outbuf));
-*/
+      if (outbuf)
+        tputs(serv, outbuf, strlen(outbuf));
     }
     }
+
+
   } else if (reversing && !match_my_nick(mv->nick))
   } else if (reversing && !match_my_nick(mv->nick))
     add_mode(chan, '-', 'o', mv->nick);
     add_mode(chan, '-', 'o', mv->nick);