Jump to content

Archived

This topic is now archived and is closed to further replies.

chain

Channel Control Dialog 1.2

Recommended Posts

  • Administrators
Recent Updates & Modifications:

 

Updated 22 May 2012: (V1.2)

** Script will now write files to the script directory, Hopefully this will put an end to the WinVista/Win7 Problem which prevents applications writing into Program Files.

** Fixed an issue when the BlackList Ban was applied, The re-population of the Channel Ban List to include the BlackListed Ban, resulted in double entries appearing.

 

** BlackList: Added a Date when the BlackList was added, and an optional reason which will be shown to the user in the Kick Message. NOTE: Due to this change, The 1.1 version is Incompatible with this 1.2 version, However, I have added a function which will update the BlackList Databases automatically, Please load this version into mIRC as normal, then in a channel window, type /ccdbupdate - This will then update the older database to this version, and send the older database to your Recycle Bin just incase you still need it. - Once Updated you will no longer require the feature, and you can safely delete it from the script, as it is not required in the main script itself.

 

Updated 6 May 2012: (V1.1)

** Added Numeric 482 (Channel Operator Status Needed) Support

** From Now On, All New Releases Will Be Version Numbered, This Release is now V1.1

** Re-Aligned All The Dialogs so they match up perfectly (Sorry but it was annoying me)

** Enabled Horizontal Scroll in the "Set By" field on the Ban / Exception / Invite Page for servers which use full (user!ident@hostname) in the BEI Lists as sometimes it was too long to visibly see (You can now click in the field and press Home / End to see the whole text, The field remains Read Only)

** Enabled StatusBar to Notify on Server Prohibited Messages.

 

Updated 4 May 2012:

** Added Numeric 472 (Unknown Mode Numeric) Support

 

Updated: 1 May 2012:

** Added A New BlackList Ban Feature: Entering #* instead of Channel Names, will make the Ban Globally Work, Regardless of Channel Ban Settings, If a user is spotted with the BlackListed Hostname, They will be Kicked+Banned from *ALL* Channels you are an Operator in.

 

Updated: 30 April 2012:

** Fixed 2 minor issues with BlackList Entry setting and deletion.

** BlackList Entries were not deleting correctly *Fixed

** Added a Checkbox with the Delete Function (so you won't accidentally delete them by accident)

** Now Checks Ban / Invite / Exception Support on the IRCd you are connected to, and will ONLY enable the lists / checkbuttons which the server supports.

----

 

This is a Channel Control Dialog, intended to replace the crappy default mIRC-style one with one which has a nice set of features, which I hope you will find useful.

 

This Channel Control Dialog allows you to modify the following aspects of a channel:

* Channel Mode Letters and now has Check Boxes for the most Common Channel Modes.

* Channel Key Setting.

* User Limit Setting.

* Channel Topic Setting.

* Ban List Add / Delete

* Exception List Add / Delete

* Invite List Add / Delete

* Channel BlackList Feature (Add / Remove Hosts To Automatically Ban User On Sight)

 

Currently does NOT check for Channel Operator Rights, But nothing can be altered if you are not a Channel Operator anyway, as the IRCd / Services will stop / reverse any changes being made.

 

LOADING INSTRUCTIONS:

 

1) You are better if you paste this into a NEW empty file, Example: ChannelControl.mrc

 

2) Type //run explorer $mircdir (using TWO forward slashes) into mIRC, This will open your mIRC folder, Paste the ChannelControl.mrc into that folder, and Confirm / OK any dialogs which pop-up.

 

3) Inside mIRC, Type /load -rs $mircdir\ChannelControl.mrc This will load the script into mIRC.

 

4) Goto a Channel Window (It will not work on the Status/Server Tab!), then Right-Click and select the option "Channel Control 1.2", which usually appears at the Bottom of the Channel Context Menu.

 

 

5) The Channel Control Dialog will then appear where you can Change the Channel settings.

 

 

t_59854_qHGqQ1J0Gh6cafrCq3pA4hx9O.png t_59854_DHDJ3nHPdSPpBO4A2Dp41D9jP.png t_59854_wlx3e5zrufzNiFH7Wlgsrpw7P.png

 

>; Channel Control Dialog 1.2 by Amiga600 - To Replace The Crappy In-Built One :P; Posted on Hawkee Script Despository: http://www.hawkee.com/snippets/user/59854/; Ideally this should be saved to an external file "ChannelControl.mrc" for example; and imported into mIRC like follows: /load -rs ChannelControl.mrc; NOTE: Channel Control 1.1 BlackList will *NOT* work in this version, due to several; changes being made, notably, adding the Date which the blacklist was added and an; editable reason for the ban.; To Update your old database into the newer format, Type /ccdbupdate into mIRC after you; have loaded this script, It will then update your database, afterwards you can safely; remove the database updater from this script (section is right at the bottom of this file); Either call the Dialog up via the "Channel Control Dialog" in the right-click Channel; Menu, or type /chancont into mIRC directly.; This Script can be modified by the end user, provided credit is given to myself for creating it.; The Dialogs were created using DialogStudio, as I found it easier to do them with that program.dialog chancontrol {  title "Channel Control Dialog 1.2"  size -1 -1 375 200  option dbu  tab "General Settings", 1, 8 7 360 166  edit "", 2, 23 88 201 56, tab 1 multi limit 500  text "Channel Topic:", 3, 24 80 106 8, tab 1  text "Channel Creation Date:", 4, 24 39 102 8, tab 1  edit "", 5, 23 48 130 10, tab 1 read autohs center  text "Channel Key:", 8, 241 39 48 8, tab 1  edit "", 9, 240 48 50 10, tab 1 limit 30 center  edit "", 10, 311 48 29 10, tab 1 limit 3 center  text "User Limit:", 11, 313 39 27 8, tab 1  text "Channel Modes:", 13, 169 39 44 8, tab 1  text "Current Topic Length:", 31, 126 152 56 8, tab 1  button "Update Channel Topic", 39, 24 150 64 12, tab 1  edit "", 12, 168 48 49 10, tab 1 limit 20 center  edit "", 14, 184 151 40 10, tab 1 read center  button "Set Mode(s)", 15, 169 60 46 10, tab 1  button "Set", 16, 240 60 21 10, tab 1  button "Set Limit", 23, 312 60 27 10, tab 1  button "Un-Set", 24, 266 60 24 10, tab 1  text "Common Modes:", 49, 240 80 54 8, tab 1  check "Protected Topic", 50, 239 96 65 10, tab 1  check "No External Messages", 51, 239 112 69 10, tab 1  check "Moderated", 52, 239 128 50 10, tab 1  check "Secret", 53, 312 96 50 10, tab 1  check "Private", 54, 312 112 50 10, tab 1  check "Invite Only", 55, 312 128 50 10, tab 1  tab "Ban / Exception / Invite List's", 17  list 18, 12 32 115 105, disable tab 17 sort size hsbar  list 19, 131 32 115 105, disable tab 17 sort size hsbar  list 22, 249 32 115 105, disable tab 17 sort size hsbar  text "Channel Ban List:", 26, 13 24 44 8, tab 17  text "Channel Exception List:", 27, 132 24 67 8, tab 17  text "Channel Invite List:", 28, 251 24 61 8, tab 17  edit "", 29, 57 142 223 10, tab 17 center  text "Edit Entry:", 33, 15 143 39 8, tab 17  button "Delete", 35, 321 157 40 12, disable tab 17  button "Add", 36, 321 141 40 12, disable tab 17  edit "", 37, 57 156 223 10, tab 17 read autohs center  text "Set By / Date:", 38, 15 158 39 8, tab 17  radio "Exception", 40, 284 150 35 10, disable tab 17  radio "Invite", 41, 284 160 31 10, disable tab 17  radio "Ban", 34, 284 140 27 10, disable tab 17  tab "BlackList", 6  text "BlackList: (Entries Listed here will be Blacklisted on Channel Joins)", 7, 13 24 166 8, tab 6  list 25, 12 34 169 119, tab 6 size hsbar  text "Black List Ban's must always follow the USER!IDENT@HOST Format. Channel names must be separated by Spaces, and you can use #* to mean ALL Channels you are on.", 42, 192 112 169 22, tab 6  button "Add BlackList Ban", 43, 192 90 105 12, tab 6  button "Delete Selected BlackList Ban", 44, 95 156 89 12, disable tab 6  text "BlackList Ban: ( USER ! IDENT @ HOST )", 46, 192 25 166 8, tab 6  text "Channels To Ban This User On: (Eg. #Chat #Help - or #* for ALL)", 47, 192 47 167 8, tab 6  edit "", 30, 191 35 170 10, tab 6 autohs center  edit "", 32, 191 55 170 10, tab 6 autohs center  check "Enable Delete Button", 48, 17 157 71 10, tab 6  edit "", 45, 191 75 170 10, tab 6 autohs limit 400 center  text "Blacklist Reason: (Shown when the user is Kicked Out)", 57, 192 67 164 8, tab 6  text "NOTE: You *MUST* be a Channel Operator or IRCop in order for this BlackList to work on your chosen Channels.", 56, 191 144 169 16, tab 6  check "Default Reason", 58, 311 86 50 10, tab 6  button "OK", 20, 8 182 39 12, ok  button "Cancel", 21, 56 182 39 12, cancel  edit "Channel Control Dialog 1.2   (C)2012 Amiga600 @ http://www.hawkee.com/snippets/user/59854/", 99, 104 182 264 12, read autohs center}menu channel {  -  Channel Control 1.2:/chancont}#chancontroldialog off; Server-Support Numeric Handlingraw $5:/^[^ ]+ (.*)are supported by this server/i:{ tokenize 32 $regml(1) | num5-add $* }alias -l num5-add { hadd -m num5 $+($cid,_,$regsubex($1,/^(.*?)(=(.*))?$/,\1 $iif(\3,\3,$true))) }alias num5 { return $iif($hget(num5,$+($iif($2,$2,$cid),_,$1)),$v1,$false) }on *:DISCONNECT:{ if ($hget(num5)) { hdel -w num5 $+($cid,_*) } }alias version {  if ($hget(num5)) { hdel -w num5 $+($cid,_*) }  !version}; Other Raw Numeric Handlingraw *:*: {  if ($numeric == 332) {    ; Channel Topic    did -r chancontrol 2 1    did -o chancontrol 2 1 $3-    did -o chancontrol 14 1 $len($3-)  }  if ($numeric == 324) {    ; Channel Modes    did -o chancontrol 12 1 $3-    if (t isincs $3-) did -c chancontrol 50 1 ;Channel Topic    elseif (t !isincs $3-) did -u chancontrol 50 1    if (n isincs $3-) did -c chancontrol 51 1 ;No External Messages    elseif (n !isincs $3-) did -u chancontrol 51 1    if (m isincs $3-) did -c chancontrol 52 1 ;Moderated    elseif (m !isincs $3-) did -u chancontrol 52 1    if (s isincs $3-) did -c chancontrol 53 1 ;Secret    elseif (s !isincs $3-) did -u chancontrol 53 1    if (p isincs $3-) did -c chancontrol 54 1 ;Private    elseif (p !isincs $3-) did -u chancontrol 54 1    if (i isincs $3-) did -c chancontrol 55 1 ;Invite    elseif (i !isincs $3-) did -u chancontrol 55 1  }  if ($numeric == 329) {    ; Channel Creation Date    did -o chancontrol 5 1 $asctime($3)  }  if ($numeric == 367) {    ; Channel Ban List    var %output $3 ( $+ $4 $+ ) $asctime($5)    inc %chban 1    did -o chancontrol 18 %chban %output  }  if ($numeric == 348) {    ; Channel Exception List    var %output $3 ( $+ $4 $+ ) $asctime($5)    inc %chexc 1    did -o chancontrol 19 %chexc %output  }  if ($numeric == 346) {    ; Channel Invite List    var %output $3 ( $+ $4 $+ ) $asctime($5)    inc %chinv 1    did -o chancontrol 22 %chinv %output  }  if ($numeric == 472) || ($numeric == 482) {    ; Unknown Mode Character    did -o chancontrol 99 1 Error: $2-  }}on 1:dialog:chancontrol:*:*: {  ; Debug Line  ; if ($devent != mouse) echo -a DNAME: $dname - DEVENT: $devent - DID: $did  if ($devent = sclick) {    if ($did = 34) {	  ; Ban Checkmark	  set %listmode b	  did -eo chancontrol 36 1 Add Ban	  did -eo chancontrol 35 1 Del Ban    }    if ($did = 40) {	  ; Exception Checkmark	  set %listmode e	  did -eo chancontrol 36 1 Add Exception	  did -eo chancontrol 35 1 Del Exception    }    if ($did = 41) {	  ; Invite Checkmark	  set %listmode I	  did -eo chancontrol 36 1 Add Invite	  did -eo chancontrol 35 1 Del Invite    }  }  if ($devent = edit) {    if ($did = 2) {	  var %toplen $did(chancontrol,2,1).len	  inc %toplen $did(chancontrol,2,2).len	  inc %toplen $did(chancontrol,2,3).len	  inc %toplen $did(chancontrol,2,4).len	  inc %toplen $did(chancontrol,2,5).len	  inc %toplen $did(chancontrol,2,6).len	  inc %toplen $did(chancontrol,2,7).len	  inc %toplen $did(chancontrol,2,8).len	  did -o chancontrol 14 1 %toplen / $num5(TOPICLEN)    }  }  if ($devent = sclick) {    if ($did = 20) || ($did = 21) {	  .disable #chancontroldialog	  .timercccopy  off	  if ($hget(num5)) { hdel -w num5 $+($cid,_*) } ;Server-Numeric Handling    }    if ($did = 39) {	  ; Update Channel Topic	  var %chtopic $did(chancontrol,2,1) $+ $did(chancontrol,2,2) $+ $did(chancontrol,2,3) $+ $did(chancontrol,2,4) $+ $did(chancontrol,2,5) $+ $did(chancontrol,2,6) $+ $did(chancontrol,2,7)	  if (%chtopic != $null) { /topic %chname %chtopic | did -o chancontrol 99 1 Channel %chname Topic Updated. }    }    if ($did = 15) {	  ; Update Channel Modes	  if ($did(chancontrol,12,1) != $null) { /mode %chname %chmodes | /mode %chname | did -o chancontrol 99 1 Channel %chname Modes Updated. }      }    if ($did = 16) {	  ; Update Channel Key	  if ($did(chancontrol,9,1) != $null) { /mode %chname +k %chkey | /mode %chname | did -o chancontrol 99 1 Channel %chname Key/Password Updated. }    }    if ($did = 24) {	  ; Unset Channel Key	  /mode %chname -k $did(chancontrol,9,1)	  /mode %chname	  did -o chancontrol 99 1 Channel %chname Key/Password Removed.    }    if ($did = 23) {	  var %chset 0	  if ($did(chancontrol,10,1) > 0) && ($did(chancontrol,10,1) < 999) { /var %chset 1 }	  if (%chset = 0) { /mode %chname -l | did -o chancontrol 99 1 Channel %chname Limit Removed. }	  if (%chset = 1) { /mode %chname +l $did(chancontrol,10,1) | did -o chancontrol 99 1 Channel %chname Limit Set To %chlim Users. }    }    if ($did = 18) {	  ; Handle Ban List	  set %listmode b	  did -o chancontrol 29 1 $gettok($did(chancontrol,18).seltext,1,32)	  did -o chancontrol 37 1 $gettok($did(chancontrol,18).seltext,2,32) on $gettok($did(chancontrol,18).seltext,3-,32)	  did -c chancontrol 34 1	  did -u chancontrol 40 1	  did -u chancontrol 41 1	  did -eo chancontrol 36 1 Add Ban	  did -eo chancontrol 35 1 Del Ban    }    if ($did = 19) {	  ; Exception List	  set %listmode e	  did -o chancontrol 29 1 $gettok($did(chancontrol,19).seltext,1,32)	  did -o chancontrol 37 1 $gettok($did(chancontrol,19).seltext,2,32) on $gettok($did(chancontrol,19).seltext,3-,32)	  did -u chancontrol 34 1	  did -c chancontrol 40 1	  did -u chancontrol 41 1	  did -eo chancontrol 36 1 Add Exception	  did -eo chancontrol 35 1 Del Exception    }    if ($did = 22) {	  ; Invite List	  set %listmode I	  did -o chancontrol 29 1 $gettok($did(chancontrol,22).seltext,1,32)	  did -o chancontrol 37 1 $gettok($did(chancontrol,22).seltext,2,32) on $gettok($did(chancontrol,22).seltext,3-,32)	  did -u chancontrol 34 1	  did -u chancontrol 40 1	  did -c chancontrol 41 1	  did -eo chancontrol 36 1 Add Invite	  did -eo chancontrol 35 1 Del Invite    }    if ($did = 36) {	  ; Add Button	  if (%listmode = b) {	    set %chban 0	    var %temp $did(chancontrol,29)	    var %banset $gettok(%temp,1,32)	    did -r chancontrol 18 1	    .mode %chname +b %banset	    .mode %chname +b	    did -o chancontrol 99 1 Channel %chname Ban %banset Added.	  }	  if (%listmode = e) {	    set %chexc 0	    var %temp $did(chancontrol,29)	    var %banset $gettok(%temp,1,32)	    did -r chancontrol 19 1	    .mode %chname +e %banset	    .mode %chname +e	    did -o chancontrol 99 1 Channel %chname Exception %banset Added.	  }	  if (%listmode = I) {	    set %chinv 0	    var %temp $did(chancontrol,29)	    var %banset $gettok(%temp,1,32)	    did -r chancontrol 22 1	    .mode %chname +I %banset	    .mode %chname +I	    did -o chancontrol 99 1 Channel %chname Invite %banset Added.	  }    }    if ($did = 35) {	  ; Delete Button	  if (%listmode = b) {	    set %chban 0	    var %temp $did(chancontrol,29)	    var %banset $gettok(%temp,1,32)	    did -r chancontrol 18 1	    .mode %chname -b %banset	    .mode %chname +b	    did -o chancontrol 99 1 Channel %chname Ban %banset Deleted.	  }	  if (%listmode = e) {	    set %chexc 0	    var %temp $did(chancontrol,29)	    var %banset $gettok(%temp,1,32)	    did -r chancontrol 19 1	    .mode %chname -e %banset	    .mode %chname +e	    did -o chancontrol 99 1 Channel %chname Exception %banset Deleted.	  }	  if (%listmode = I) {	    set %chinv 0	    var %temp $did(chancontrol,29)	    var %banset $gettok(%temp,1,32)	    did -r chancontrol 22 1	    .mode %chname -I %banset	    .mode %chname +I	    did -o chancontrol 99 1 Channel %chname Invite %banset Deleted.	  }    }    if ($did = 43) {	  ; Add To BlackList Button	  var %bantype $did(chancontrol,30)	  var %chans $did(chancontrol,32)	  var %reason $did(chancontrol,45)	  if (*!*@* !iswm %bantype) { did -o chancontrol 99 1 ERROR: Must be added in USER ! IDENT @ HOST format! | halt }	  if ($chr(35) !isin %chans) { did -o chancontrol 99 1 ERROR: Must be Proper Channels, eg. #Lobby #Fred | halt }	  if (%reason = $null) { did -o chancontrol 99 1 ERROR: You must either use the Default Reason or specify one! | halt }	  did -o chancontrol 99 1 Checking BlackList..	  var %tmp 0	  did -r chancontrol 25 1	  :ccread	  inc %tmp 1	  var %blk $read($scriptdir\ChanContBL12.txt,%tmp)	  var %frd $gettok(%blk,1,32)	  did -o chancontrol 25 %tmp %blk	  if (%frd = %bantype) { write -d $scriptdir\ChanContBL12.txt $did(25).seltext }	  if (%frd != $null) goto ccread	  write $scriptdir\ChanContBL12.txt $lower(%bantype) $str($chr(124),2) $lower(%chans) $str($chr(124),2) $fulldate $str($chr(124),2) %reason	  did -o chancontrol 99 1 Added/Updated BlackList Entry Successfully.	  /chancontupdateblacklist    }    if ($did = 44) {	  ; Delete BlackList Entry	  if ($exists($scriptdir\ChanContBL12.txt)) {	    write -dl $+ $did(25).sel $scriptdir\ChanContBL12.txt	    did -b chancontrol 44	    did -u chancontrol 48	    did -o chancontrol 99 1 BlackList Entry Successfully Deleted.	    /chancontupdateblacklist	  }    }    if ($did = 25) {	  ; BlackList Selection	  did -o chancontrol 30 1 $gettok($did(chancontrol,25).seltext,1,124)	  did -o chancontrol 32 1 $gettok($did(chancontrol,25).seltext,2,124)	  did -o chancontrol 45 1 $gettok($did(chancontrol,25).seltext,4,124)	  did -b chancontrol 44	  did -u chancontrol 48	  did -n chancontrol 45 1	  did -u chancontrol 58	  did -o chancontrol 99 1 %cccopy	  if ($gettok($did(chancontrol,25).seltext,1,124) != $null) { did -o chancontrol 99 1 BlackList Entry $gettok($did(chancontrol,25).seltext,1,124) was Added on $gettok($did(chancontrol,25).seltext,3,124) }    }    if ($did = 48) {	  ; Enable BlackList Delete Button	  if ($did(chancontrol,25).seltext = $null) { did -o chancontrol 99 1 Select A BlackList Entry Before Enabling Delete! | did -u chancontrol 48 | halt }	  if ($did(chancontrol,48).state = 1) { did -e chancontrol 44 }	  if ($did(chancontrol,48).state = 0) { did -b chancontrol 44 }    }    if ($did = 58) {	  ; Default Blacklist Button	  if ($did(chancontrol,58).state = 1) { did -m chancontrol 45 1 | did -o chancontrol 45 1 You Have Been BlackListed From This Channel - Good Day! }	  if ($did(chancontrol,58).state = 0) { did -n chancontrol 45 1 | did -o chancontrol 45 1 }    }    if ($did = 50) {	  ; Topic CheckBox	  if ($did(chancontrol,50).state = 1) { .mode %chname +t | did -o chancontrol 99 1 Channel %chname Protected Topic Lock Enabled. }	  if ($did(chancontrol,50).state = 0) { .mode %chname -t | did -o chancontrol 99 1 Channel %chname Protected Topic Lock Disabled. }	  .mode %chname    }    if ($did = 51) {	  ; No External Messages CheckBox	  if ($did(chancontrol,51).state = 1) { .mode %chname +n | did -o chancontrol 99 1 Channel %chname No External Messages Enabled. }	  if ($did(chancontrol,51).state = 0) { .mode %chname -n | did -o chancontrol 99 1 Channel %chname No External Messages Disabled. }	  .mode %chname    }    if ($did = 52) {	  ; Moderated CheckBox	  if ($did(chancontrol,52).state = 1) { .mode %chname +m | did -o chancontrol 99 1 Channel %chname Moderated Mode Enabled. }	  if ($did(chancontrol,52).state = 0) { .mode %chname -m | did -o chancontrol 99 1 Channel %chname Moderated Mode Disabled. }	  .mode %chname    }    if ($did = 53) {	  ; Secret CheckBox	  if ($did(chancontrol,53).state = 1) { .mode %chname +s | did -o chancontrol 99 1 Channel %chname Secret Mode Enabled. }	  if ($did(chancontrol,53).state = 0) { .mode %chname -s | did -o chancontrol 99 1 Channel %chname Secret Mode Disabled. }	  .mode %chname    }    if ($did = 54) {	  ; Private CheckBox	  if ($did(chancontrol,54).state = 1) { .mode %chname +p | did -o chancontrol 99 1 Channel %chname Private Mode Enabled. }	  if ($did(chancontrol,54).state = 0) { .mode %chname -p | did -o chancontrol 99 1 Channel %chname Private Mode Disabled. }	  .mode %chname    }    if ($did = 55) {	  ; Invite CheckBox	  if ($did(chancontrol,55).state = 1) { .mode %chname +i | did -o chancontrol 99 1 Channel %chname Invite Mode Enabled. }	  if ($did(chancontrol,55).state = 0) { .mode %chname -i | did -o chancontrol 99 1 Channel %chname Invite Mode Disabled. }	  .mode %chname    }  }}alias -l chancontupdateblacklist {  var %tmp 0  did -r chancontrol 25 1  /chancontsortbl $scriptdir\ChanContBL12.txt  :ccblackupd  inc %tmp 1  var %blk $read($scriptdir\ChanContBL12.txt,%tmp)  var %frd $gettok(%blk,1,124)  did -o chancontrol 25 %tmp %blk  if (%frd != $null) goto ccblackupd}on *:TOPIC:#: {  ; Detects and Updates on Topic Changes While Dialog Is Open  /topic $chan}alias chancontsortbl $iif($isfile($+(",$$1-,")),filter -affc $str($+(",$1-,",$chr(32)),2))#chancontroldialog endalias chancont {  if ($chan = $null) { echo -a ERROR: You must be on a Channel to call up the Channel Control Dialog!! | halt }  .enable #chancontroldialog  dialog $iif($dialog(chancontrol), -va, -m) chancontrol chancontrol  set %chban 0  set %chexc 0  set %chinv 0  set %chname $chan  .topic $chan  .mode $chan  set %cccopy Channel Control Dialog 1.2   (C)2012 Amiga600 @ http://www.hawkee.com/snippets/user/59854/  .timercccopy 0 20 did -o chancontrol 99 1 %cccopy  if (b isincs $gettok($chanmodes,1,44)) { .mode $chan +b | did -e chancontrol 18 | did -e chancontrol 34 1 | did -eo chancontrol 36 1 Add Ban | did -eo chancontrol 35 1 Del Ban | did -c chancontrol 34 1 }  elseif (b !isincs $gettok($chanmodes,1,44)) { did -o chancontrol 18 1 Un-Supported By The IRCd. }  if (e isincs $gettok($chanmodes,1,44)) { .mode $chan +e | did -e chancontrol 19 | did -e chancontrol 40 }  elseif (e !isincs $gettok($chanmodes,1,44)) { did -o chancontrol 19 1 Un-Supported By The IRCd. }  if (I isincs $gettok($chanmodes,1,44)) { .mode $chan +I | did -e chancontrol 22 | did -e chancontrol 41 }  elseif (I !isincs $gettok($chanmodes,1,44)) { did -o chancontrol 22 1 Un-Supported By The IRCd. }  set %listmode b  did -eo chancontrol 36 1 Add Ban  did -eo chancontrol 35 1 Del Ban  did -c chancontrol 34 1  .version  /chancontupdateblacklist}on *:JOIN:#: {  if ($exists($scriptdir\ChanContBL12.txt)) {    var %tmp 0    :cccheckbl    inc %tmp 1    var %blk $read($scriptdir\ChanContBL12.txt,%tmp)    var %blentry $gettok(%blk,1,124)    var %blchans $gettok(%blk,2,124)    var %blmsg $gettok(%blk,4,124)    if ($nick $+ !*@* = %blentry) { var %ban 1 }    if (%blentry iswm $address($nick,0)) { var %ban 1 }    if (%blentry iswm $address($nick,1)) { var %ban 1 }    if (%blentry iswm $address($nick,2)) { var %ban 1 }    if ($chan isin %blchans) || (#* isin %blchans) {	  if (%ban = 1) { .mode # +b %blentry | .kick # $nick BlackListed: %blmsg | set %chban 0 | .mode # +b | halt }    }    if (%blk != $null) goto cccheckbl  }}; -----------------------------------------------------------------------------------------------------; DATABASE UPDATER 1.1 TO 1.2; -----------------------------------------------------------------------------------------------------; NOTE: ONCE YOU HAVE SUCCESSFULLY UPDATED YOUR DATABASES, YOU CAN REMOVE THIS WHOLE SECTION BELOW;	   FROM THIS FILE, AS IT WILL NO LONGER BE REQUIRED FOR THIS SCRIPT TO FUNCTION.; EXTRA NOTE: DO _NOT_ DELETE ANYTHING ABOVE THIS SECTION, AS YOU MAY BREAK THE SCRIPTS FUNCTIONALITY!!; -----------------------------------------------------------------------------------------------------alias ccdbupdate {  echo -a *** Channel Control Dialog - 1.1 to 1.2 BlackList Database Updater ***  var %file $exists($scriptdir\ChanContBL.txt)  if (%file = $false) { echo -a Database file not found, or you have already updated it to 1.2 - If this is not the case, Check your Recycle Bin, then Restore the file before running this script again!! | halt }  echo -a *** Database found, I shall now read this in, and write it to the new database format..  var %tmp 0  :ccdbupdater  inc %tmp 1  var %blk $read($scriptdir\ChanContBL.txt,%tmp)  var %blentry $gettok(%blk,1,32)  var %blchans $gettok(%blk,2-,32)  if (%blentry != $null) {    echo -a *** Found Entry: BlackList HostMask: %blentry - BlackList Channels: %blchans    write $scriptdir\ChanContBL12.txt %blentry $str($chr(124),2) %blchans $str($chr(124),2) $fulldate $str($chr(124),2) You Are BlackListed From This Channel!  }  if (%blk != $null) goto ccdbupdater  echo -a *** All Entries Successfully Updated, Old Database has been moved to your Recycle Bin (you can safely delete this if the blacklist has been updated successfully)  echo -a NOTE: This updater is no longer required, You may safely edit the section out of your Channel Control file!  echo -a but only delete the lower section (it is clearly marked)  remove -b $scriptdir\ChanContBL.txt}

 

http://www.hawkee.com

Link to comment
Share on other sites



×
×
  • Create New...