Channel / Nick Moderation Dialog

By Scakk on May 06, 2007

This has now become a 2 tab dialog script. It now has more options than before. It also uses the channel in which you open the dialog as the one to be effected. There is a drop down list on tab 2 that will list all the nicks in the channel in which the dialog is opened. The edit boxes are emptied and the variables are unset once the action that uses them is taken.

Update 1: All the boxes that information is entered into is removed and the variable is unset after the button is pushed that does the action ( Ex: setting the channel's key , user limit or flood protection ).

Update 2: There is now a drop down list on the NickMod tab that has all the nicks from the channel the dialog is opened in in it. All you have to do is click the nick in the drop down menu and choose what moderating you wish to do to them.

Update 3: The dialog will now work on the active channel. This way you will not have to close and reopen to go to another channel. Also there is a refresh button so that you can refresh the drop down menu on the Nick Mod Tab to change to the active channel.

Help on this dialog was provided by Corwin and Ralfy

Menu channel,nicklist {
  [Channel/Nick Mod]:Set %channick.channel $active | Set %channick.nick $1 | /dialog -m channick channick 
}

dialog channick {
  title "Channel / Nick Moderation"
  size -1 -1 500 395
  tab "Channel Moderation", 11, 9 10 480 380
  tab "Nick Moderation", 21
  button "Mass Modes +", 995, 50 63 90 30, tab 11 Mass + 
  button "Mass Modes-", 996, 160 63 90 30, tab 11 Mass -
  box "Channel Modes", 119, 20 35 260 170, tab 11
  box "", 225, 32 102 57 92, tab 11
  button "+c", 223, 35 110 26 20, tab 11
  button "-c", 224, 62 110 26 20, tab 11
  button "+i", 226, 35 130 26 20, tab 11
  button "-i", 227, 62 130 26 20, tab 11
  button "+m", 228, 35 150 26 20, tab 11
  button "-m", 229, 62 150 26 20, tab 11
  button "+p", 230, 35 170 26 20, tab 11
  button "-p", 231, 62 170 26 20, tab 11
  button "+s", 232, 95 110 26 20, tab 11
  button "-s", 233, 122 110 26 20, tab 11
  box "", 234, 92 102 57 92, tab 11
  button "+u", 235, 95 130 26 20, tab 11
  button "-u", 236, 122 130 26 20, tab 11
  button "+iK", 237, 95 150 26 20, tab 11
  button "-iK", 238, 122 150 26 20, tab 11
  button "+nt", 239, 95 170 26 20, tab 11
  button "-nt", 240, 122 170 26 20, tab 11
  box "", 243, 152 102 57 92, tab 11
  button "+C", 244, 155 112 26 20, tab 11
  button "-C", 245, 182 112 26 20, tab 11
  button "+G", 246, 155 132 26 20, tab 11
  button "-G", 247, 182 132 26 20, tab 11
  button "+N", 248, 155 152 26 20, tab 11
  button "-N", 249, 182 152 26 20, tab 11
  button "+O", 250, 155 172 26 20, tab 11
  button "-O", 251, 182 172 26 20, tab 11
  button "+R", 252, 215 112 26 20, tab 11
  button "-R", 253, 242 112 26 20, tab 11
  button "+S", 254, 215 132 26 20, tab 11
  button "-S", 255, 242 132 26 20, tab 11
  button "+T", 256, 215 152 26 20, tab 11
  button "-T", 257, 242 152 26 20, tab 11
  box "", 258, 212 102 57 92, tab 11
  button "+V", 259, 215 172 26 20, tab 11
  button "-V", 260, 242 172 26 20, tab 11
  box "Channel Bans", 1010, 345 35 130 170, tab 11
  button "Action Block (/me)", 1013, 355 53 110 20, tab 11
  button "Action UnBlock (/me)", 1023, 355 78 110 20, tab 11
  button "Nick Change Ban", 1014, 355 103 110 20, tab 11
  button "Nick Change UnBan", 1024, 355 128 110 20, tab 11
  button "Silence Ban", 1015, 355 153 110 20, tab 11
  button "Silence UnBan", 1025, 355 178 110 20, tab 11
  box "Other Modes", 2220, 20 212 260 160, tab 11
  text "Input", 2223, 60 227 90 20, tab 11
  edit %key, 2224, 30 240 90 20, tab 11 center autohs
  button "+k" 2225, 125 240 26 20, tab 11
  button "-k" 2226, 155 240 26 20, tab 11
  text "Keyed", 2227, 205 240 80 20, tab 11
  edit %limit, 2234, 30 265 90 20, tab 11 center autohs
  button "+l" 2235, 125 265 26 20, tab 11
  button "-l" 2236, 155 265 26 20, tab 11
  text "Users Limit", 2237, 205 265 80 20, tab 11
  edit %ulimit, 2244, 30 290 90 20, tab 11 center autohs
  button "+L" 2245, 125 290 26 20, tab 11
  button "-L" 2246, 155 290 26 20, tab 11
  text "Redirect", 2247, 205 290 80 20, tab 11
  edit %fs, 2254, 30 315 90 20, tab 11 center autohs
  button "+f" 2255, 125 315 26 20, tab 11
  button "-f" 2256, 155 315 26 20, tab 11
  text "Flood #:#", 2257, 205 315 80 20, tab 11
  edit %js, 2264, 30 340 90 20, tab 11 center autohs
  button "+j" 2265, 125 340 26 20, tab 11
  button "-j" 2266, 155 340 26 20, tab 11
  text "Joins #:#", 2267, 205 340 80 20, tab 11
  box "Mass Bans", 330, 345 270 130 100, tab 11
  button "Mass Bans +", 340, 365 290 90 30, tab 11
  button "Mass Bans -", 350, 365 330 90 30, tab 11
  box "Nick Modes", 219, 20 35 120 230, tab 21
  text "Voice", 1201, 25 58 40 20, tab 21
  button "+v", 1202, 70 55 25 25, tab 21  
  button "-v", 1203, 100 55 25 25, tab 21 
  text "HalfOp", 1301, 25 88 40 20, tab 21
  button "+h", 1302, 70 85 25 25, tab 21  
  button "-h", 1303, 100 85 25 25, tab 21 
  text "Op", 1401, 25 118 40 20, tab 21
  button "+o", 1402, 70 115 25 25, tab 21  
  button "-o", 1403, 100 115 25 25, tab 21 
  text "Protect", 1501, 25 148 40 20, tab 21
  button "+a", 1502, 70 145 25 25, tab 21  
  button "-a", 1503, 100 145 25 25, tab 21 
  text "Owner", 1601, 25 178 40 20, tab 21
  button "+q", 1602, 70 175 25 25, tab 21  
  button "-q", 1603, 100 175 25 25, tab 21
  text "Invite", 1701, 25 208 40 20, tab 21
  button "+I", 1702, 70 205 25 25, tab 21  
  button "-I", 1703, 100 205 25 25, tab 21
  text "Except", 1801, 25 238 40 20, tab 21
  button "+e", 1802, 70 235 25 25, tab 21 
  button "-e", 1803, 100 235 25 25, tab 21
  box "Ban Modes" 2001, 150 35 135 145, tab 21
  text "Normal Ban", 2007, 160 58 90 20, tab 21
  button "+b", 2008, 220 55 25 25, tab 21  
  button "-b", 2009, 250 55 25 25, tab 21
  text "Nick Ban", 2010, 165 88 90 20, tab 21
  button "+b", 2011, 220 85 25 25, tab 21  
  button "-b", 2012, 250 85 25 25, tab 21
  text "Silence Ban", 2013, 160 118 90 20, tab 21
  button "+b", 2014, 220 115 25 25, tab 21  
  button "-b", 2015, 250 115 25 25, tab 21
  text "Kick Ban", 2016, 165 148 90 20, tab 21
  button "+b", 2017, 220 145 25 25, tab 21  
  button "-b", 2018, 250 145 25 25, tab 21
  box "Warn / Kick / Ban", 100, 293 35 185 100, tab 21
  text "Reason", 503, 305 50 90 20, tab 21
  edit %reason1, 603, 305 65 160 20, tab 21 center autohs
  button "Warn", 1101, 305 88 40 40, tab 21 warn
  button "Kick", 1102, 366 88 40 40, tab 21 kick
  button "Ban", 1103, 427 88 40 40, tab 21 ban
  box "Invite", 101, 293 136 185 100, tab 21
  text "Nick", 2503, 305 153 90 20, tab 21
  edit %nick, 2504, 305 168 90 20, tab 21 center autohs
  text "Channel", 2505, 305 195 90 20, tab 21 
  edit %channel, 2506, 305 210 90 20, tab 21 center autohs
  button "Invite", 2507, 415 175 50 50, tab 21 invite
  combo 1, 293 245 185 100, tab 21
  button "Refresh", 1111, 293 340 185 30, tab 21 Refresh
  box "Ignore / Silence", 123, 150 185 135 81, tab 21 
  button "I 15", 124, 155 200 30 25, tab 21
  button "I 30", 125, 187 200 30 25, tab 21
  button "I 45", 126, 219 200 30 25, tab 21
  button "I 60", 127, 252 200 30 25, tab 21
  button "S 15", 128, 155 235 30 25, tab 21
  button "S 30", 129, 187 235 30 25, tab 21
  button "S 45", 130, 219 235 30 25, tab 21
  button "S 60", 131, 252 235 30 25, tab 21
  box "Mass Nick Modes", 30, 20 270 120 100, tab 21
  button "Mass Modes +", 31, 35 290 90 30, tab 21
  button "Mass Modes -", 32, 35 330 90 30, tab 21
  box "Mass Bans", 33, 150 270 135 100, tab 21
  button "Mass Bans +", 34, 175 290 90 30, tab 21
  button "Mass Bans -", 35, 175 330 90 30, tab 21

}

on *:dialog:channick:*:*:{ 
  if ($devent == init) { 
    set %channick.channel $active
    var %total = $nick($active,0) , %x = 1
    while ( %x <= %total ) {
      /did -i $dname 1 %x $nick($active,%x)
    inc %x }
  }
  if ($devent == sclick) {
    var %total = $nick($active,0), %x = 1
    if ($did == 1111) {    
      while ( %x <= %total ) {
        did -r $dname 1 %x $nick($active,%x) 
        timer -h 1 1 did -o $dname 1 %x $nick($active,%x) 
      inc %x } 
    } 
    if ($did == 31) { /mode $active + $+ $$?="Modes?"  $$?="Nicks?" } 
    if ($did == 32) { /mode $active - $+ $$?="Modes?"  $$?="Nicks?" }
    if ($did == 34) { /mode $active + $+ $$?="Bans?"  $$?="Nicks?"  } 
    if ($did == 35) { /mode $active - $+ $$?="Bans?"  $$?="Nicks?"  }
    if ($did == 124)  { /ignore $did(1).seltext 
      echo $active * Added $did(1).seltext $+ !*@* to ignore list for 15 minutes
      /timer 1 900 /ignore -r $did(1).seltext 
      /timer 1 902 /echo $active * Removed $did(1).seltext $+ !*@* from ignore list 
    }
    if ($did == 125) { /ignore $did(1).seltext 
      echo $active * Added $did(1).seltext $+ !*@* to ignore list for 30 minutes
      /timer 1 1800 /ignore -r %$did(1).seltext 
      /timer 1 1802 /echo $active * Removed $did(1).seltext $+ !*@* from ignore list 
    }
    if ($did == 126) { /ignore $did(1).seltext
      echo $active * Added $did(1).seltext $+ !*@* to ignore list for 45 minutes
      /timer 1 2700 /ignore -r $did(1).seltext 
      /timer 1 2702 /echo $active * Removed $did(1).seltext $+ !*@* from ignore list 
    }
    if ($did == 127) { /ignore $did(1).seltext 
      echo $active * Added $did(1).seltext $+ !*@* to ignore list for 60 minutes
      /timer 1 3600 /ignore -r $did(1).seltext 
      /timer 1 3602 /echo $active * Removed $did(1).seltext $+ !*@* from ignore list 
    }
    if ($did == 128) { 
      /mode $active +b ~q: $+ $address($did(1).seltext,2)
      /timer 1 900 { /mode $active -b ~q: $+ $address($did(1).seltext,2) }
    }
    if ($did == 129) { 
      /mode $active +b ~q: $+ $address($did(1).seltext,2)
      /timer 1 1800 { /mode $active -b ~q: $+ $address($did(1).seltext,2) }
    }
    if ($did == 130) { 
      /mode $active +b ~q: $+ $address($did(1).seltext,2)
      /timer 1 2700 { /mode $active -b ~q: $+ $address($did(1).seltext,2) }
    }
    if ($did == 131) {
      /mode $active +b ~q: $+ $address($did(1).seltext,2)
      /timer 1 3600 { /mode $active -b ~q: $+ $address($did(1).seltext,2)  }
    }
    if ($did == 223) { /mode $active +c }
    if ($did == 224) { /mode $active -c }
    if ($did == 226) { /mode $active +i }
    if ($did == 227) { /mode $active -i }  
    if ($did == 228) { /mode $active +m }
    if ($did == 229) { /mode $active -m }
    if ($did == 230) { /mode $active +p }
    if ($did == 231) { /mode $active -p }
    if ($did == 232) { /mode $active +s }
    if ($did == 233) { /mode $active -s }
    if ($did == 235) { /mode $active +u }
    if ($did == 236) { /mode $active -u }
    if ($did == 237) { /mode $active +iK }
    if ($did == 238) { /mode $active -iK }
    if ($did == 239) { /mode $active +nt }
    if ($did == 240) { /mode $active -nt }
    if ($did == 241) { /mode $active +A }
    if ($did == 242) { /mode $active -A }
    if ($did == 244) { /mode $active +C }
    if ($did == 245) { /mode $active -C }
    if ($did == 246) { /mode $active +G }
    if ($did == 247) { /mode $active -G }
    if ($did == 248) { /mode $active +N }
    if ($did == 249) { /mode $active -N }
    if ($did == 250) { /mode $active +O }
    if ($did == 251) { /mode $active -O }
    if ($did == 252) { /mode $active +R }
    if ($did == 253) { /mode $active -R }
    if ($did == 254) { /mode $active +S }
    if ($did == 255) { /mode $active -S }
    if ($did == 256) { /mode $active +T }
    if ($did == 257) { /mode $active -T }
    if ($did == 259) { /mode $active +V }
    if ($did == 260) { /mode $active -V }
    if ($did == 340) { /mode $active + $+ $$?="Bans?"  $$?="Nicks?" $did(340) } 
    if ($did == 350) { /mode $active - $+ $$?="Bans?"  $$?="Nicks?" $did(350) }
    if ($did == 995) { /mode $active + $+ $$?="Modes?" $did(995) }  
    if ($did == 996) { /mode $active - $+ $$?="Modes?" $did(996) } 
    if ($did == 1013) { /mode $active +b ~T:block:ACTION* $did(1013) }
    if ($did == 1023) { /mode $active -b ~T:block:ACTION* $did(1023) }
    if ($did == 1014) { /mode $active +b ~n:*!*@* $did(1014) }
    if ($did == 1024) { /mode $active -b ~n:*!*@* $did(1024) }
    if ($did == 1015) { /mode $active +b ~q:*!*@* $did(1015) }
    if ($did == 1025) { /mode $active -b ~q:*!*@* $did(1025) }
    if ($did == 1101) { /msg $active [Warning] $did(1).seltext  $+ : %reason1 $did(603) | /timer 1 3 /did -r $dname 603 | /timer 1 5  /unset -s %reason1  }
    if ($did == 1102) { /kick $active $did(1).seltext %reason1  $did(603) | /did -r $dname 603 | /unset -s %reason1  }
    if ($did == 1103) { /mode $active +b $address($did(1).seltext,2)  | /kick $active $did(1).seltext %reason1 $did(603) | /did -r $dname 603 | /unset -s %reason1 }
    if ($did == 1202) { /mode $active +v $did(1).seltext $did(1202) }
    if ($did == 1203) { /mode $active -v $did(1).seltext $did(1203) }
    if ($did == 1302) { /mode $active +h $did(1).seltext $did(1302) }
    if ($did == 1303) { /mode $active -h $did(1).seltext $did(1303) }
    if ($did == 1402) { /mode $active +o $did(1).seltext $did(1402) }
    if ($did == 1403) { /mode $active -o $did(1).seltext $did(1403) }
    if ($did == 1502) { /mode $active +a $did(1).seltext $did(1502) }
    if ($did == 1503) { /mode $active -a $did(1).seltext $did(1503) }
    if ($did == 1602) { /mode $active +q $did(1).seltext $did(1602) }
    if ($did == 1603) { /mode $active -q $did(1).seltext $did(1603) }
    if ($did == 1702) { /mode $active +I $did(1).seltext $did(1702) }
    if ($did == 1703) { /mode $active -I $did(1).seltext $did(1703) }
    if ($did == 1802) { /mode $active +e $did(1).seltext $did(1802) }
    if ($did == 1803) { /mode $active -e $did(1).seltext $did(1803) }      
    if ($did == 2008) { /mode $active +b $address($did(1).seltext,2) $did(2008) }
    if ($did == 2009) { /mode $active -b $address($did(1).seltext,2) $did(2009) }
    if ($did == 2011) { /mode $active +b ~n: $+ $address($did(1).seltext,2) $did(2011) }
    if ($did == 2012) { /mode $active -b ~n: $+ $address($did(1).seltext,2) $did(2012) }
    if ($did == 2014) { /mode $active +b ~q: $+ $address($did(1).seltext,2) $did(2014) }
    if ($did == 2015) { /mode $active -b ~q: $+ $address($did(1).seltext,2) $did(2015) }
    if ($did == 2017) { /mode $active +b $address($did(1).seltext,2) $did(2017) | /kick $active $did(1).seltext }
    if ($did == 2018) { /mode $active -b $address($did(1).seltext,2) $did(2018) }
    if ($did == 2225) { /mode $active +k %key $did(2224) | /did -r $dname 2224 | /unset -s %key }
    if ($did == 2226) { /mode $active -k %key $did(2224)  | /did -r $dname 2224 | /unset -s %key }
    if ($did == 2235) { /mode $active +l %limit $did(2234)  | /did -r $dname 2234 | /unset -s %limit }
    if ($did == 2236) { /mode $active -l %limit $did(2234)  | /did -r $dname 2234 | /unset -s %limit }
    if ($did == 2245) { /mode $active +L %ulimit $did(2244)  | /did -r $dname 2244 | /unset -s %ulimit }
    if ($did == 2246) { /mode $active -L %ulimit $did(2244)  | /did -r $dname 2244  | /unset -s %ulimit }
    if ($did == 2255) { /mode $active +f %fs $did(2254)  | /did -r $dname 2254 | /unset -s %fs }
    if ($did == 2256) { /mode $active -f %fs $did(2254)  | /did -r $dname 2254 | /unset -s %fs }
    if ($did == 2265) { /mode $active +j %js $did(2264)  | /did -r $dname 2264 | /unset -s %js }
    if ($did == 2266) { /mode $active -j %js $did(2264)  | /did -r $dname 2264 | /unset -s %js }
    if ($did == 2507) { /invite %nick %channel $did(2504) $did(2506) | /did -r $dname 2504,2506 | /unset -s %nick | /unset -s %channel }
  }
}

Comments

Sign in to comment.
vaseline28   -  May 28, 2008

Great work again Scakk, I\'m looking forward to the remake!

With the invite, if nick is already in the channel, it echoes it back to the status window, but could you make it add a line to the dialog \"Cannot invite, nick is already in that channel\" ??

In the nick-list, could you add in access levels next to the nicks?

Hopefully, you\'ll put this in your update!

Edit: And silenced timers == great!

 Respond  
guest598594   -  Sep 26, 2007

i like this a lot but i have some suggestions:

With nick moderation, i would disable every button until you input/select a nick and if u input then erase, disable em again
same with like inivte, only enable the invite button if they type in a nick and channel, and if they erase it, disable it

 Respond  
Scakk   -  Jun 24, 2007

Update 3: The dialog will now work on the active channel. This way you will not have to close and reopen to go to another channel. Also there is a refresh button so that you can refresh the drop down menu on the Nick Mod Tab to change to the active channel.

 Respond  
SpotRedDog   -  May 19, 2007

I am new here and I am telling you that this i a thing of beauty and I wish I had thought of it I have a few scripts I just am not quite sure I wanna put them on here just yet!?!?! But I am starting to lean that way <=\')->-< but hey I am just the dunce cap and burn out cuz no one is left up this time of the morning.
Lates and Great Job Scakk and I love that devil I need it!!!!!

 Respond  
Scakk   -  May 17, 2007

Update 1: All the boxes that information is entered into is removed and the variable is unset after the button is pushed that does the action ( Ex: setting the channel\'s key , user limit or flood protection ).

Update 2: There is now a drop down list on the NickMod tab that has all the nicks from the channel the dialog is opened in in it. All you have to do is click the nick in the drop down menu and choose what moderating you wish to do to them

 Respond  
Scakk   -  May 13, 2007

Lindrian - I left some variable as set as they need the information inserted do to the fuction of the operation.

Meliorite - The reason I left it as it is instead of one all encompassing on statement is to make is easy for others ( and myself ^_^ ) to find and alter one easily.

 Respond  
|MELIORITE|   -  May 09, 2007

I\'m just wondering if its any easier to use something like:

on *:DIALOG:NickModeration:sclick:*:{ 
   if ($did == 202) { mode %channel4 +v %nick }
   if ($did == 203) { mode %channel4 -v %nick }

etc.

 Respond  
Lindrian   -  May 08, 2007

If you dont SET a variable, you wont need to \"did -r $dname id\" on the init event.
Instead do a check if the modes are already set or not, if theyre set, disable the button that handles it.

IMO!

 Respond  
Scakk   -  May 08, 2007

Updated 2: On the Channel Moderation one there is now the Mass + / Mass - butons. They can be used to add or remove multiple channel modes from a channel at once.

Update 3: Now any place you enter information has unlimited text space.

 Respond  
Scakk   -  May 07, 2007

Thanks.

Update: Changed the width of the reason boxes on the Warnkickban dialog. I also made the ban on that dialog address based instead of nick. It will ban the nick\'s address instead of thier nick ( type their nick the the nick box still )

 Respond  
sinnercreed   -  May 07, 2007

Nifty, good work :]

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.