;==========================================================
; Project    : Complete Protection System (CPS)
; Script     : CPS Dialog File. (Documented[P])
;==========================================================
; Author     : amit (uber @ dalnet #mumbai)
; Email      : amit9815@yahoo.com
; Version    : 7.0
; FileName   : cps.mrc
; Section(s) : 2
; Copyright (C) 2006 Amit (amit9815@yahoo.com)
;==========================================================


;=================
; Remotes & Events
;=================

;----------------------------------------
; Section A
;----------------------------------------
; Desc: The dialogs.
;----------------------------------------

;settings dialog one
dialog cps.gen1 {
  title "CPS Error"
  size -1 -1 148 162
  option dbu
  icon $scriptdircpslogo.ico, 0
  tab "CPS Error", 500, 1 0 145 146
  combo 1, 9 28 50 73, disable tab 500 sort size
  button "&Add", 2, 8 104 25 12, disable tab 500
  button "&Remove", 3, 35 104 25 12, disable tab 500
  edit "", 202, 4 132 139 12, disable tab 500 multi autohs autovs
  box "Error", 6, 4 18 61 101, disable tab 500
  radio "Auto-Kick", 100, 73 27 38 9, disable group tab 500
  radio "F-Key Activation", 101, 73 42 52 9, disable tab 500
  radio "Only kick the nick", 102, 73 63 53 11, disable group tab 500
  radio "Kick-Ban the nick", 103, 73 78 52 10, disable tab 500
  edit "", 200, 72 89 19 10, disable tab 500
  text "Ban time in sec(s)", 16, 93 90 46 8, disable tab 500
  text "Enter the kick message below!", 19, 4 122 138 8, disable tab 500 center
  box "Punishment level", 300, 69 55 75 21, disable tab 500
  box "Punishment level", 5, 69 55 75 64, tab 500
  box "", 7, 69 35 74 20, disable tab 500
  button "Cancel", 8, 105 148 37 12, tab 500 cancel
  combo 201, 72 102 68 45, size vsbar drop
  box "Activate F-Key or Auto Kick", 303, 69 18 74 21, disable
  button "Save && Exit", 9, 6 148 37 12, ok
  menu "File", 10
  item "Current status", 11, 10
  item "BREAK", 14, 10
  item "Close dialog", 15, 10
}

;settings dialog two
dialog cps.gen2 {
  title "CPS Error"
  size -1 -1 148 162
  option dbu
  icon $scriptdircpslogo.ico, 0
  tab "CPS Error", 500, 1 0 145 146
  edit "", 1, 9 26 15 10, disable tab 500
  text "", 55, 8 49 51 67, disable tab 500 center
  text "repeats", 3, 26 27 28 8, disable tab 500
  text "seconds", 7, 34 38 26 8, disable tab 500
  edit "", 202, 4 132 139 12, disable tab 500 multi autohs autovs
  box "Error", 6, 4 18 61 101, disable tab 500
  radio "Auto-Kick", 100, 73 27 38 9, disable group tab 500
  radio "F-Key Activation", 101, 73 42 52 9, disable tab 500
  radio "Only kick the nick", 102, 73 63 53 11, disable group tab 500
  radio "Kick-ban the nick", 103, 73 78 52 10, disable tab 500
  edit "", 200, 72 89 19 10, disable tab 500
  text "Ban time in sec(s)", 16, 93 90 46 8, disable tab 500
  text "Enter the kick message below!", 19, 4 122 138 8, disable tab 500 center
  box "Punishment level", 300, 69 55 75 21, disable tab 500
  box "Punishment level", 5, 69 55 75 64, tab 500
  box "", 70, 69 35 74 20, disable tab 500
  button "Cancel", 8, 105 148 37 12, tab 500 cancel
  combo 201, 72 102 68 45, size vsbar drop
  box "Activate F-Key or Auto-Kick", 303, 69 18 74 21, disable
  button "Save && Exit", 4, 6 148 37 12, ok
  edit "", 2, 9 37 22 10, disable
  menu "File", 10
  item "Current status", 11, 10
  item "BREAK", 14, 10
  item "Close dialog", 15, 10
}

;settings dialog three
dialog cps.gen3 {
  title "CPS Error"
  size -1 -1 148 162
  option dbu
  icon $scriptdircpslogo.ico, 0
  tab "CPS Error", 500, 1 0 145 146
  edit "", 1, 26 26 20 10, disable tab 500
  text "", 55, 8 37 53 79, disable tab 500 center
  edit "", 202, 4 132 139 12, disable tab 500 multi autohs autovs
  box "Error", 6, 4 18 61 101, disable tab 500
  radio "Auto kick", 100, 73 27 38 9, group tab 500
  radio "F-Key Activation", 101, 73 42 52 9, tab 500
  radio "Only kick the nick", 102, 73 63 53 11, disable group tab 500
  radio "Kick-ban the nick", 103, 73 78 52 10, disable tab 500
  edit "", 200, 72 89 19 10, disable tab 500
  text "Ban time in sec(s)", 16, 93 90 46 8, disable tab 500
  text "Enter the kick message below!", 19, 4 122 138 8, disable tab 500 center
  box "Punishment level", 300, 69 55 75 21, disable tab 500
  box "Punishment level", 5, 69 55 75 64, tab 500
  box "", 70, 69 35 74 20, disable tab 500
  button "Cancel", 8, 105 148 37 12, tab 500 cancel
  combo 201, 72 102 68 45, size vsbar drop
  box "Activate F-Key or Auto-Kick", 303, 69 18 74 21
  button "Save && Exit", 4, 6 148 37 12, ok
  menu "File", 10
  item "Current status", 11, 10
  item "BREAK", 14, 10
  item "Close dialog", 15, 10
}

;settings dialog four
dialog cps.gen4 {
  title "CPS Error"
  size -1 -1 85 162
  option dbu
  icon $scriptdircpslogo.ico, 0
  tab "CPS Error", 500, 1 0 82 146
  edit "", 202, 5 132 75 12, disable tab 500 multi autohs autovs
  radio "Auto-Kick", 100, 8 26 38 9, disable group tab 500
  radio "F-Key Activation", 101, 8 41 52 9, disable tab 500
  radio "Only kick the nick", 102, 8 62 53 11, disable group tab 500
  radio "Kick-ban the nick", 103, 8 77 52 10, disable tab 500
  edit "", 200, 7 88 19 10, disable tab 500
  text "Ban time in sec(s)", 16, 28 89 46 8, disable tab 500
  text "Enter the kick message below!", 19, 5 122 74 8, disable tab 500
  box "Punishment level", 300, 4 54 75 21, disable tab 500
  box "Punishment level", 5, 4 54 75 64, tab 500
  box "", 70, 4 34 75 20, disable tab 500
  button "Cancel", 8, 46 148 37 12, tab 500 cancel
  combo 201, 7 102 68 45, size vsbar drop
  box "Activate F-Key or Auto-Kick", 303, 4 17 75 21, disable
  button "Save && Exit", 4, 2 148 37 12, ok
  menu "File", 10
  item "Current status", 11, 10
  item "BREAK", 14, 10
  item "Close dialog", 15, 10
}

;settings dialog 5
dialog cps.gen5 {
  title "CPS Error"
  size -1 -1 84 113
  option dbu
  icon $scriptdircpslogo.ico, 0
  tab "CPS Error", 500, 1 0 81 97
  radio "Auto-Ban", 100, 8 26 38 9, disable group tab 500
  radio "F-Key Activation", 101, 8 41 52 9, disable tab 500
  edit "", 200, 7 64 19 10, disable tab 500
  text "Ban time in sec(s)", 16, 28 65 46 8, disable tab 500
  box "Punishment level", 300, 4 54 75 42, disable tab 500
  box "", 70, 4 34 75 20, disable tab 500
  button "Cancel", 8, 45 99 37 12, tab 500 cancel
  combo 201, 7 80 68 45, size vsbar drop
  box "Activate F-Key or Auto-Ban", 303, 4 17 75 21, disable
  button "Save && Exit", 4, 2 99 37 12, ok
  menu "File", 10
  item "Current status", 11, 10
  item "BREAK", 14, 10
  item "Close dialog", 15, 10
}

;spam detector
dialog cps.spam {
  title "CPS Spam Detector"
  size -1 -1 145 94
  option dbu
  box "Options", 12, 92 0 53 47
  box "Blocked Words/Phrases", 2, 0 0 91 94
  check "Auto-Kick", 7, 95 7 39 10
  check "Auto-Ignore", 8, 95 20 41 10
  check "Auto-Message", 9, 95 34 44 10
  check "Spam Detector", 1, 95 50 46 11
  combo 4, 2 8 86 71, sort size
  button "-", 99, 60 79 28 13
  button "+", 100, 2 79 28 13
  button "&Save", 10, 94 80 49 12, ok
  button "&Help", 14, 94 65 49 12
  box "", 3, 92 45 53 17
  box "", 5, 92 60 53 34
  box "", 6, 92 60 53 19
}

;warning options
dialog cps.warn {
  title "CPS Warning Options"
  size -1 -1 138 128
  option dbu
  icon $scriptdircpslogo.ico, 0
  list 222, 55 85 28 21, size
  check "Swear", 1, 6 9 31 10
  check "URL Ads", 8, 47 9 31 10
  check "Away-Script", 16, 90 9 40 10
  check "Clone", 17, 90 22 31 10
  check "Chan Ads", 9, 47 22 35 10
  check "Repeat", 2, 6 22 31 10
  check "Text Flood", 3, 6 35 35 10
  check "Non-letter", 10, 47 35 35 10
  check "Non-English", 21, 90 35 40 10
  check "Sounds", 11, 47 47 31 10
  check "Long Text", 4, 6 47 36 10
  check "Punctuation", 5, 90 58 38 10
  check "Slaps", 12, 47 59 31 10
  check "User Expl", 13, 6 70 34 10
  check "Caps", 6, 90 47 31 10
  check "Colors", 7, 6 59 31 10
  check "Chan Note", 14, 47 71 36 10
  box "CPS Warning Options", 22, 2 0 133 125
  button "S&ave", 15, 8 87 37 17, ok
  check "Select &none", 201, 94 83 37 12, push
  check "Select &all", 200, 94 96 37 12, push
  text "NOTE: A checked box indicates a warning will be sent for that reason.", 58, 7 109 124 13, center
  box "", 18, 5 81 43 26
  box "", 20, 86 0 49 82
  box "", 19, 2 78 107 4
}

; About cps
dialog _about {
  title "About & Credits for CPS"
  size -1 -1 309 203
  option dbu
  icon $scriptdircpslogo.ico, 0
  tab "About CPS", 1, 2 0 307 188
  text "Complete Protection System (CPS)", 5, 49 56 211 8, tab 1 center
  text "Author: Amit (amit9815@yahoo.com) / (amit9815@gmail.com)", 6, 49 66 211 8, tab 1 center
  text "I would like to thank you all for making CPS such a huge success. This is version 7.00 of this addon. It is basically a bug fix of version 6.0 primarily attending to past issues. I have also documented all of the files so that those of you who want to help in developing CPS or are just curious how I manage this addon.", 7, 24 83 236 28, tab 1 center
  text "Support: If you have some BUG(S)/REQUEST/SUGGESTION about CPS or you some ideas about improving it please mail me. By documenting this source I am giving you the liberty to modify it as per your will. Read copying.txt to know about the license issue. ", 9, 24 115 236 21, tab 1 center
  text "If you have developed a certain feature for CPS which you would like me to add in the official version just send it to me with a complete documentation on what you have done. If I like it and find it useful and worthy of adding in CPS it will be added with due credits.", 10, 24 140 236 24, tab 1 center
  text "Regards Amit", 12, 119 170 51 14, tab 1 center
  box "", 3, 5 15 302 30
  text "CPS : Complete Protection System", 8, 45 24 250 23, enable
  box "", 11, 5 42 302 145
  tab "Credits", 2
  text "Credits", 13, 120 50 62 9, tab 2 center
  text "A lot of names to mention but one person stands out for helping most. Merlin` on DALnet", 14, 31 59 237 14, tab 2 center
  text "Creating", 15, 120 75 62 9, tab 2 center
  text "Merlin, Kintar0, zaz, LocustusOfBorg, NukeGuy, DrDoctor97 and TreeKiller", 16, 31 85 237 15, tab 2 center
  text "Upgrading and Evolution", 17, 120 120 62 9, tab 2
  text "Airwolf, NukeGuy/Atta (For designing the new dialogs with mdx and extensive bug testing) Merlin, TreeKiller, Redmat(missing :/), Darkness(hello brotha), Viper^(Missing :/), khaleej, dude2, ^Recov3r^(missing :/), KeRnoW(missing :/), operators of channels #helpdesk, #hdtest on DALnet.", 18, 31 129 236 24, tab 2 center
  text "Greets!", 19, 120 154 62 9, tab 2 center
  text "I would like to greet my freinds Linux-Gal, sadaa, scag, hitu, haunted`gurl, daze, kinky, KosmicKurse fang, bmn, porki, frozendata, paro, ClipperChip, and idiots in #mumbai", 20, 31 162 236 20, tab 2 center
  text "I would also like to thank fubar(for hosting my addon on your site), dohcan(for dialog studio and hosting), tabo(for your amazing aircdll.dll), myndzi(for socket bot tutorial) and zack^(for socket bot identd snipplet) DragonZap(for mdx.dll).", 21, 31 100 236 20, tab 2 center
  button "Close", 4, 274 190 32 13, ok cancel
  list 222, 15 20 28 21, size
  text "I am uber, yerdad, deific or kink (nicks) on DALnet #mumbai", 22, 6 191 248 9 ,enable
}

ON *:DIALOG:_about:INIT:0: {
  mdx.start
  mdx SetFont 8 30 400 georgia Bold
  mdx MarkDialog $dname
  mdx SetBorderStyle 4 staticedge
  mdx SetFont 1,5,6,7,9,10,12,13,14,15,16,17,18,19,20,21 12 400 verdana bold
  mdx SetFont 22 14 400 verdana bold
  mdx SetMircVersion $version
  mdx SetControlMDX $dname 222 toolbar arrows nodivider flat noresize wrap > $shortfn($scriptdirbars.mdx)
  mdx SetBorderStyle 222
  did -i $dname 222 1 bmpsize 32 32
  did -i $dname 222 1 setimage +nh icon large $shortfn($scriptdircpslogo.ico)
  did -a $dname 222 +w 1 $chr(9) $+ CPS By Amit

}
;warnings message editor
dialog _warnedit {
  title "CPS Warnings Message Editor"
  size -1 -1 363 282
  option dbu
  icon $scriptdircpslogo.ico, 0
  box "Warning for", 2, 1 27 51 217
  text "Clone", 7, 7 39 38 8, center
  box "Warning message", 3, 52 27 311 217
  edit "", 215, 55 36 305 12, autohs
  edit "", 216, 55 48 305 12, autohs
  text "Non-English", 8, 8 51 38 8, center
  button "Save &Exit", 104, 264 260 38 19, multi ok cancel
  button "Reset to defaults! ", 103, 303 260 57 19, multi
  text "Sounds", 63, 7 63 38 8, center
  text "Slap", 62, 7 75 38 8, center
  text "User Exploits", 61, 7 87 38 8, center
  text "Chan Notice", 60, 7 99 38 8, center
  text "Away-Scripts", 59, 7 110 38 8, center
  edit "", 214, 55 108 305 12, autohs
  edit "", 213, 55 96 305 12, autohs
  edit "", 212, 55 84 305 12, autohs
  edit "", 211, 55 72 305 12, autohs
  edit "", 210, 55 60 305 12, autohs
  text "Caps", 51, 7 122 38 8, center
  text "Colors", 50, 7 134 38 8, center
  text "URL Ads", 49, 7 146 38 8, center
  text "Chan Ads", 48, 7 159 38 8, center
  text "Non-letters", 47, 7 170 38 8, center
  edit "", 209, 55 168 305 12, autohs
  edit "", 208, 55 156 305 12, autohs
  edit "", 207, 55 144 305 12, autohs
  edit "", 206, 55 132 305 12, autohs
  edit "", 205, 55 120 305 12, autohs
  text "Swear", 102, 8 182 38 8, center
  text "Repeat", 101, 8 194 38 8, center
  text "Text Flood", 100, 9 206 38 8, center
  text "Long Text", 99, 8 219 38 8, center
  text "Punctuation", 98, 9 231 38 8, center
  edit "", 204, 55 228 305 12, autohs
  edit "", 203, 55 216 305 12, autohs
  edit "", 202, 55 204 305 12, autohs
  edit "", 201, 55 192 305 12, autohs
  edit "", 200, 55 180 305 12, autohs
  text "CPS Warnings Editor System", 106, 94 3 172 8, center
  text "This dialog allows you to edit the CPS Warning texts that you want to send to a user when ever he\she breaks a rule. ", 77, 12 12 347 10, center
  text "NOTE:- All warning are sent via *notice*                                                                                 Warning!!! donot use /notice or /msg In the input box!!! ", 105, 2 245 359 9, center
  box "", 1, 1 -2 362 28
  box "", 4, 1 240 362 17
  box "", 5, 1 254 362 27
}

; Private protection system
dialog pps {
  title "Private Protection System (PPS)"
  size -1 -1 244 104
  option dbu
  tab "PPS 1", 500, 2 3 239 85
  box "Private Notice", 12, 6 22 114 30, tab 500
  box "Action", 301, 126 22 57 30, tab 500
  box "", 303, 61 53 178 14, tab 500
  box "", 306, 185 63 54 23, tab 500
  box "", 302, 182 22 57 30, tab 500
  box "", 304, 61 63 63 23, tab 500
  box "", 305, 123 63 63 23, tab 500
  text "Trigger On", 100, 9 36 29 8, tab 500
  text "Notice(s) in", 101, 54 36 27 8, tab 500
  text "Sec(s)", 102, 98 36 19 8, tab 500
  text "Ignore User For ", 103, 129 28 40 8, tab 500
  text "Sec(s)", 104, 146 36 18 8, tab 500
  text "If User Is In Protected Channel", 107, 106 58 78 8, tab 500
  text "Set Mode", 105, 193 28 25 8, tab 500
  text "+", 106, 196 36 8 8, tab 500
  check "ON / OFF", 1, 7 56 51 10, tab 500
  edit "", 15, 38 35 15 10, tab 500 limit 2
  edit "", 17, 129 35 15 10, tab 500
  edit "", 18, 206 35 15 10, tab 500 limit 3
  edit "", 16, 82 35 15 10, tab 500 limit 2
  radio "Kick The User", 47, 188 71 47 10, group tab 500
  radio "Kick Ban The User", 46, 126 71 54 10, tab 500
  radio "Do Nothing", 45, 66 71 50 10, tab 500
  tab "PPS 2", 501
  box "", 312, 123 63 63 23, tab 501
  box "", 309, 182 22 57 30, tab 501
  box "", 311, 61 63 63 23, tab 501
  box "", 313, 185 63 54 23, tab 501
  box "", 310, 61 53 178 14, tab 501
  box "Action", 308, 126 22 57 30, tab 501
  box "Private Invite", 307, 6 22 114 30, tab 501
  text "Ignore User For ", 112, 129 28 40 8, tab 501
  text "Sec(s)", 113, 146 36 18 8, tab 501
  text "Set Mode", 114, 193 28 25 8, tab 501
  text "+", 115, 196 36 8 8, tab 501
  text "If User Is In Protected Channel", 116, 106 58 78 8, tab 501
  text "Sec(s)", 111, 98 36 19 8, tab 501
  text "Invite(s) in", 110, 54 36 27 8, tab 501
  text "Trigger On", 109, 9 36 29 8, tab 501
  check "ON / OFF", 2, 7 56 51 10, tab 501
  edit "", 19, 38 35 15 10, tab 501 limit 2
  edit "", 20, 82 35 15 10, tab 501 limit 2
  edit "", 21, 129 35 15 10, tab 501
  edit "", 22, 206 35 15 10, tab 501 limit 3
  radio "Do Nothing", 48, 66 71 50 10, group tab 501
  radio "Kick Ban The User", 49, 126 71 54 10, tab 501
  radio "Kick The User", 50, 188 71 47 10, tab 501
  tab "PPS 3", 502
  box "Private TEXT", 314, 6 22 114 30, tab 502
  box "Action", 315, 126 22 57 30, tab 502
  box "", 317, 61 53 178 14, tab 502
  box "", 320, 185 63 54 23, tab 502
  box "", 318, 61 63 63 23, tab 502
  box "", 316, 182 22 57 30, tab 502
  box "", 319, 123 63 63 23, tab 502
  text "Sec(s)", 119, 98 36 19 8, tab 502
  text "Ignore User For ", 120, 129 28 40 8, tab 502
  text "Sec(s)", 121, 146 36 18 8, tab 502
  text "Set Mode", 122, 193 28 25 8, tab 502
  text "+", 123, 196 36 8 8, tab 502
  text "Trigger On", 117, 9 36 29 8, tab 502
  text "If User Is In Protected Channel", 124, 106 58 78 8, tab 502
  text "Line(s) in", 118, 54 36 27 8, tab 502
  check "ON / OFF", 3, 7 56 51 10, tab 502
  edit "", 23, 38 35 15 10, tab 502 limit 2
  edit "", 24, 82 35 15 10, tab 502 limit 2
  edit "", 25, 129 35 15 10, tab 502
  edit "", 26, 206 35 15 10, tab 502 limit 3
  radio "Do Nothing", 51, 66 71 50 10, group tab 502
  radio "Kick Ban The User", 52, 126 71 54 10, tab 502
  radio "Kick The User", 53, 188 71 47 10, tab 502
  tab "PPS 4", 503
  box "", 326, 123 63 63 23, tab 503
  box "", 323, 182 22 57 30, tab 503
  box "", 325, 61 63 63 23, tab 503
  box "", 327, 185 63 54 23, tab 503
  box "", 324, 61 53 178 14, tab 503
  box "Action", 322, 126 22 57 30, tab 503
  box "Private Action", 321, 6 22 114 30, tab 503
  text "Trigger On", 125, 9 36 29 8, tab 503
  text "Sec(s)", 127, 98 36 19 8, tab 503
  text "Ignore User For ", 128, 129 28 40 8, tab 503
  text "Sec(s)", 129, 146 36 18 8, tab 503
  text "Set Mode", 130, 193 28 25 8, tab 503
  text "+", 131, 196 36 8 8, tab 503
  text "If User Is In Protected Channel", 132, 106 58 78 8, tab 503
  text "Action(s) in", 126, 54 36 27 8, tab 503
  check "ON / OFF", 4, 7 56 51 10, tab 503
  edit "", 27, 38 35 15 10, tab 503 limit 2
  edit "", 28, 82 35 15 10, tab 503 limit 2
  edit "", 29, 129 35 15 10, tab 503
  edit "", 30, 206 35 15 10, tab 503 limit 3
  radio "Do Nothing", 54, 66 71 50 10, group tab 503
  radio "Kick Ban The User", 55, 126 71 54 10, tab 503
  radio "Kick The User", 56, 188 71 47 10, tab 503
  tab "PPS 5", 504
  box "Private CTCP", 328, 6 22 114 30, tab 504
  box "Action", 329, 126 22 57 30, tab 504
  box "", 331, 61 53 178 14, tab 504
  box "", 334, 185 63 54 23, tab 504
  box "", 332, 61 63 63 23, tab 504
  box "", 330, 182 22 57 30, tab 504
  box "", 333, 123 63 63 23, tab 504
  text "Trigger On", 133, 9 36 29 8, tab 504
  text "CTCP(s) in", 134, 54 36 27 8, tab 504
  text "Sec(s)", 135, 98 36 19 8, tab 504
  text "Ignore User For ", 136, 129 28 40 8, tab 504
  text "Sec(s)", 137, 146 36 18 8, tab 504
  text "Set Mode", 138, 193 28 25 8, tab 504
  text "+", 139, 196 36 8 8, tab 504
  text "If User Is In Protected Channel", 140, 106 58 78 8, tab 504
  check "ON / OFF", 5, 7 56 51 10, tab 504
  edit "", 31, 38 35 15 10, tab 504 limit 2
  edit "", 32, 82 35 15 10, tab 504 limit 2
  edit "", 33, 129 35 15 10, tab 504
  edit "", 34, 206 35 15 10, tab 504 limit 3
  radio "Do Nothing", 57, 66 71 50 10, group tab 504
  radio "Kick Ban The User", 58, 126 71 54 10, tab 504
  radio "Kick The User", 59, 188 71 47 10, tab 504
  tab "PPS 6", 505
  box "", 340, 123 63 63 23, tab 505
  box "", 337, 182 22 57 30, tab 505
  box "", 339, 61 63 63 23, tab 505
  box "", 341, 185 63 54 23, tab 505
  box "", 338, 61 53 178 14, tab 505
  box "Action", 336, 126 22 57 30, tab 505
  box "Query Flood", 335, 6 22 114 30, tab 505
  text "Trigger On", 141, 9 36 29 8, tab 505
  text "Query(s) in", 142, 54 36 28 8, tab 505
  text "Sec(s)", 143, 98 36 19 8, tab 505
  text "Ignore All For ", 144, 129 28 40 8, tab 505
  text "Sec(s)", 145, 146 36 18 8, tab 505
  text "Set Mode", 146, 193 28 25 8, tab 505
  text "+", 147, 196 36 8 8, tab 505
  text "If User Is In Protected Channel", 148, 106 58 78 8, tab 505
  check "ON / OFF", 6, 7 56 51 10, tab 505
  edit "", 35, 38 35 15 10, tab 505 limit 2
  edit "", 36, 82 35 15 10, tab 505 limit 2
  edit "", 37, 129 35 15 10, tab 505
  edit "", 38, 206 35 15 10, tab 505 limit 3
  radio "Do Nothing", 60, 66 71 50 10, group tab 505
  radio "Kick Ban The User", 61, 126 71 55 10, tab 505
  radio "Kick The User", 62, 188 71 47 10, tab 505
  button "Save && Exit", 555, 198 90 37 12
  button "?", 701, 222 36 8 8
  button "?", 700, 164 36 8 8
  button "&Exception List!!", 702, 7 70 48 14
}

;spam bot settings table
dialog sb.set {
  title "CPS SocketBot Spam Checker"
  size -1 -1 224 134
  option dbu
  icon $scriptdirCPSLOGO.ICO, 0
  box "General Settings!", 200, 2 0 129 101
  text "Bot's Nick", 400, 8 11 40 8
  text "Alternative Nick", 401, 8 22 40 8
  text "Server to use.", 402, 8 33 40 8
  text "Reserved", 407, 7 44 43 8, disable
  edit "", 307, 53 42 74 10, disable pass
  edit "", 302, 53 31 74 10, autohs
  edit "", 301, 53 20 74 10, autohs
  edit "", 300, 53 9 74 10, autohs
  text "Bot's Name", 403, 8 55 40 8
  edit "", 303, 53 53 74 10, autohs
  edit "", 304, 53 64 74 10, autohs limit 9
  text "Bot's Identd", 404, 8 65 40 8
  text "Port To use", 405, 8 76 40 8
  edit "", 305, 53 75 74 10, autohs
  edit "", 308, 53 86 74 10
  text "Part Message", 408, 8 87 40 8
  box "", 4, 131 0 91 19
  radio "Join All Protected Channels?", 50, 135 6 82 10, group
  radio "Only Join the below channels.", 51, 134 22 82 10
  box "", 5, 131 15 91 19
  combo 1, 133 35 86 49, size
  button "&Add", 2, 135 87 28 12
  button "&Del", 3, 191 87 28 12
  box "", 6, 131 31 91 54
  box "", 8, 2 98 220 18
  text "Cycle Time for Bot in the channel", 406, 6 105 109 9
  box "", 202, 131 82 91 19
  box "", 7, 116 98 2 18
  box "", 9, 157 98 2 18
  check "Shut Down Bot", 500, 160 104 59 10
  button "&Save && Exit", 600, 145 119 37 12
  button "&Cancel", 601, 183 119 37 12, ok cancel
  edit "", 306, 119 103 16 10, autohs limit 3
  text "min(s)", 10, 137 104 17 8
  box "", 11, 2 113 220 20
}
;PPS Exception List
dialog pps.ex {
  title "PPS Exception List"
  size -1 -1 89 151
  option dbu
  tab "(PPS) Exceptional Nicks", 100, 0 0 87 149
  box "Exception List", 200, 3 16 79 114, tab 100
  combo 1, 10 30 66 80, tab 100 size
  button "&Add", 2, 12 114 25 12, tab 100
  button "&Save && Exit", 4, 3 135 37 12, tab 100
  button "&Cancel", 5, 49 135 37 12, tab 100 CANCEL
  button "&Del", 3, 49 114 25 12
}

;----------------------------------------
; Section B
;----------------------------------------
; Desc: The dialog events.
;----------------------------------------

; General settings one
ON *:DIALOG:CPS.GEN1:INIT:0:{
  IF (%_cps.par == 1) {
    _enab
    dialog -t $dname Editing Swear kick Settings for %_cps
    set %_cps.p swear
    did -ra $dname 6,500 Swear kick
    did -b $dname 2,3
  }
  IF (%_cps.par == 2) {
    _enab
    dialog -t $dname Editing Url Ads kick Settings for %_cps
    set %_cps.p urlads
    did -ra $dname 6 Url ads kick
    did -ra $dname 6 Exception list
    did -b $dname 2,3
  }
  IF (%_cps.par == 3) {
    _enab
    dialog -t $dname Editing Channel Ads kick Settings for %_cps
    set %_cps.p chanads
    did -ra $dname 500 Channel ads kick
    did -ra $dname 6 Exception list
    did -b $dname 2,3
  }
  IF (%_cps.par == 4) {
    _enab
    dialog -t $dname Editing Bad Nick kick Settings for %_cps
    set %_cps.p nick
    did -ra $dname 6,500 Bad Nick kick
    did -b $dname 2,3
  }
  IF (%_cps.par == 5) {
    _enab
    dialog -t $dname Editing Bad Identd kick Settings for %_cps
    set %_cps.p ident
    did -ra $dname 6,500 Bad Identd kick
    did -b $dname 2,3
  }
  IF (%_cps.par == 6) {
    _enab
    dialog -t $dname Editing Bad Script kick Settings for %_cps
    set %_cps.p script
    did -ra $dname 6,500 Bad Script kick
    did -b $dname 2,3
  }
  IF (%_cps.par == 7) {
    _enab
    dialog -t $dname Editing Bad Channel kick Settings for %_cps
    set %_cps.p channel
    did -ra $dname 6,500 Bad Channel kick
    did -b $dname 2,3
  }
  IF (%_cps.par == 8) {
    _enab
    dialog -t $dname Editing Blacklisted nick kick Settings for %_cps
    set %_cps.p blnic
    did -ra $dname 6,500 Blacklisted Nick kick
    did -b $dname 2,3
  }
  IF ((%_cps.par != $null) && (%_cps.p != $null)) {
    set %_cps. [ $+ [ %_cps.p ] ] $cps.rvi(%_cps,%_cps.p)
    didtok $dname 1 59 $cps.rvi(%_cps,%_cps.p)
    dobans $dname
    IF ($cps.rvi(%_cps,$+(%_cps.p,.ktrig)) == auto) { did -c $dname 100 }
    IF ($cps.rvi(%_cps,$+(%_cps.p,.ktrig)) == manual) { did -c $dname 101 }
    IF ($cps.rvi(%_cps,$+(%_cps.p,.kact)) == kick) {
      did -c $dname 102
      did -br $dname 200,201
    }
    IF ($cps.rvi(%_cps,$+(%_cps.p,.kact)) == kickban) {
      did -c $dname 103
      did -e $dname 200,201
    }
    IF (($cps.rvi(%_cps,$+(%_cps.p,.ktime)) != $null) && ($cps.rvi(%_cps,$+(%_cps.p,.kact)) != kick)) { did -ra $dname 200 $cps.rvi(%_cps,$+(%_cps.p,.ktime)) }
    IF (($cps.rvi(%_cps,$+(%_cps.p,.ktype)) != $null) && ($cps.rvi(%_cps,$+(%_cps.p,.kact)) != kick)) { did -c $dname 201 $cps.rvi(%_cps,$+(%_cps.p,.ktype)) }
    IF ($cps.rvi(%_cps,$+(%_cps.p,.kmsg)) != $null) { did -ra $dname 202 $cps.rvi(%_cps,$+(%_cps.p,.kmsg)) }
  }
}
ON *:DIALOG:CPS.GEN1:EDIT:1: {
  did -e $dname 2
  did -b $dname 3
}
ON *:DIALOG:CPS.GEN1:SCLICK:1: {
  did -e $dname 3
  did -b $dname 2
}
ON *:DIALOG:CPS.GEN1:SCLICK:2: {
  IF ($did(1).text) {
    did -a $dname 1 $did(1).text
    did -c $dname 1 $did(1,1)
  }
}
ON *:DIALOG:CPS.GEN1:SCLICK:3: {
  IF ($did(1,$did(1).sel)) {
    did -d $dname 1 $did(1).sel
    did -c $dname 1 $did(1,1)
  }
}
ON *:DIALOG:CPS.GEN1:SCLICK:102: { did -br $dname 200,201 }
ON *:DIALOG:CPS.GEN1:MENU:11: {
  unset %_cps.pooh
  var %i = $did(1).lines
  while (%i > 0) {
    set %_cps.pooh $addtok(%_cps.pooh,$did(1,%i),59)
    dec %i 1
  }
  IF (%_cps.pooh != $null) { echo $color(info2) $_place $_time *** 4(CPS) Current item(s) in %_cps.p list are -> $replace(%_cps.pooh,$chr(59),$chr(32)) }
  IF (%_cps.pooh == $null) { echo $color(info2) $_place $_time *** 4(CPS) There are no item(s) in %_cps.p list }
  IF ($did(100).state == 1) { echo $color(info2) $_place $_time *** 4(CPS) Nick will be automatically kicked from the channel }
  IF ($did(101).state == 1) { echo $color(info2) $_place $_time *** 4(CPS) On offence CPS will activate an fkey(F9) which u can hit on your will to kick the user }
  IF ($did(102).state == 1) { echo $color(info2) $_place $_time *** 4(CPS) Offender will be only kicked from %_cps on breaking rule. }
  IF ($did(103).state == 1) { echo $color(info2) $_place $_time *** 4(CPS) Offender will be kicked banned from %_cps $+ , ban time:- $duration($did(200).text) $+ , ban type:- $did(201).text $+ , with the kick message -> $did(202).text }
  linesep
  echo $color(info2) $_place $_time *** 4(CPS) End of status report!
}
ON *:DIALOG:CPS.GEN1:MENU:15: {
  unset %_cps.par
  unset %_cps.p
  cps.save %_cps
  dialog -x $dname
  _cps
}
ON *:DIALOG:CPS.GEN1:SCLICK:103: {
  did -e $dname 200,201
  dobans $dname
  IF ($cps.rvi(%_cps,$+(%_cps.p,.ktime)) != $null) { did -ra $dname 200 $cps.rvi(%_cps,$+(%_cps.p,.ktime)) }
  IF ($cps.rvi(%_cps,$+(%_cps.p,.ktype)) != $null) { did -c $dname 201 $cps.rvi(%_cps,$+(%_cps.p,.ktype)) }
}
ON *:DIALOG:CPS.GEN1:SCLICK:9: {
  IF ((%_cps.par != $null) && (%_cps.p != $null)) {
    unset %_cps. [ $+ [ %_cps.p ] ]
    var %i = $did(1).lines
    while (%i > 0) {
      set %_cps. [ $+ [ %_cps.p ] ] $addtok(%_cps. [ $+ [ %_cps.p ] ],$did(1,%i),59)
      dec %i 1
    }
    IF (%_cps. [ $+ [ %_cps.p ] ] != $null) { cps.rvs %_cps %_cps.p %_cps. [ $+ [ %_cps.p ] ] }
    IF ($did(1).lines == 0) { cps.rvs %_cps %_cps.p }
    IF ($did(100).state == 1) { cps.rvs %_cps $+(%_cps.p,.ktrig) auto }
    IF ($did(101).state == 1) { cps.rvs %_cps $+(%_cps.p,.ktrig) manual }
    IF ($did(102).state == 1) { cps.rvs %_cps $+(%_cps.p,.kact) kick }
    IF ($did(103).state == 1) { cps.rvs %_cps $+(%_cps.p,.kact) kickban }
    IF ($did(200).text != $null) { cps.rvs %_cps $+(%_cps.p,.ktime) $did(200).text }
    IF ($did(201).text != $null) { cps.rvs %_cps $+(%_cps.p,.ktype) $did(201).text }
    IF ($did(202).text != $null) { cps.rvs %_cps $+(%_cps.p,.kmsg) $did(202).text }
    ELSE { echo $color(info) $_place $_time 10Error no kick message was set, *Resetting* last message! }
    unset %_cps.par
    unset %_cps.p
    cps.save %_cps
    dialog -x $dname
    _cps
  }
}

ON *:DIALOG:CPS.GEN1:SCLICK:8: { _cps }

; General settings 2
ON *:DIALOG:CPS.GEN2:INIT:0:{
  did -ra $dname 3,7,55
  IF (%_cps.par == 9) {
    _enab2
    dialog -t $dname Editing Repeat kick Settings for %_cps
    did -ra $dname 3 Repeats in
    did -ra $dname 7 sec(s)
    did -ra $dname 55 In first box enter the number of repeats. In second box enter the number of seconds nick should do above in. $str($chr(160),3) NOTE:- don't leave the edit boxes blank, this might cause an error in script.
    did -ra $dname 6,500 Repeat kick
    set %_cps.p Repeat
  }
  IF (%_cps.par == 10) {
    _enab2
    dialog -t $dname Editing text Flood kick Settings for %_cps
    did -ra $dname 3 Lines in
    did -ra $dname 7 Sec
    did -ra $dname 55 In the first box enter the number of lines. In second box enter the number of seconds nick should do above in. $str($chr(160),3) NOTE:- don't leave the edit boxes blank, this might cause an error in script.
    did -ra $dname 6,500 Text Flood kick
    set %_cps.p txtflood
  }
  IF (%_cps.par == 11) {
    _enab2
    dialog -t $dname Editing Sound Play kick Settings for %_cps
    did -ra $dname 3 Sounds in
    did -ra $dname 7 Sec
    did -ra $dname 55 In first box enter the number of sound plays. In second box enter the number of seconds nick should do above in. $str($chr(160),3) NOTE:- don't leave the edit boxes blank, this might cause an error in script.
    did -ra $dname 6,500 Sound Play kick
    set %_cps.p sound
  }
  IF (%_cps.par == 12) {
    _enab2
    dialog -t $dname Editing Trout Slap kick Settings for %_cps
    did -ra $dname 3 Slaps in
    did -ra $dname 7 Sec
    did -ra $dname 55 In first box enter the number of slap actions. In second box enter the number of seconds nick should do above in. $str($chr(160),3) NOTE:- don't leave the edit boxes blank, this might cause an error in script.
    did -ra $dname 6,500 Trout Slap kick
    set %_cps.p slap
  }
  IF (%_cps.par == 13) {
    _enab2
    dialog -t $dname Editing Channel Notice kick Settings for %_cps
    did -ra $dname 3 Notices in
    did -ra $dname 7 Sec
    did -ra $dname 55 In first box enter the number of chan notices. In second box enter the number of seconds nick should do above in. $str($chr(160),3) NOTE:- don't leave the edit boxes blank, this might cause an error in script.
    did -ra $dname 6,500 Channel Notice kick
    set %_cps.p cnote
  }
  IF (%_cps.par == 14) {
    _enab2
    dialog -t $dname Editing Mass Join Flood kick Settings for %_cps
    did -ra $dname 3 Joins in
    did -ra $dname 7 Sec
    did -ra $dname 55 In first box enter the number of joins. In second box enter the number of seconds nick should do above in. $str($chr(160),3) NOTE:- don't leave the edit boxes blank, this might cause an error in script.
    did -ra $dname 6,500 Mass Join Flood kick
    set %_cps.p jpflood
    did -b $dname 101
  }
  IF (%_cps.par == 15) {
    _enab2
    dialog -t $dname Editing quit Flood kick Settings for %_cps
    did -ra $dname 3 Quits in
    did -ra $dname 7 Sec
    did -ra $dname 55 In first box enter the number of quits. In second box enter the number of seconds nick should do above in. $str($chr(160),3) NOTE:- don't leave the edit boxes blank, this might cause an error in script.
    did -ra $dname 6,500 Quit Flood kick
    set %_cps.p qflood
    did -b $dname 101
  }
  IF (%_cps.par == 16) {
    _enab2
    dialog -t $dname Editing Away script kick Settings for %_cps
    did -ra $dname 3 Awaymsgs in
    did -ra $dname 7 Sec
    did -ra $dname 55 In first box enter the number of away msgs. In second box enter the number of seconds nick should do above in. $str($chr(160),3) NOTE:- don't leave the edit boxes blank, this might cause an error in script.
    did -ra $dname 6,500 Away Script kick
    set %_cps.p away
  }
  IF (%_cps.par == 17) {
    _enab2
    dialog -t $dname Editing Channel CTCP Flood kick Settings for %_cps
    did -ra $dname 3 CTCPs in
    did -ra $dname 7 Sec
    did -ra $dname 55 In first box enter the number of CTCP(s). In second box enter the number of seconds nick should do above in. $str($chr(160),3) NOTE:- don't leave the edit boxes blank, this might cause an error in script.
    did -ra $dname 6,500 CTCP Flood kick
    set %_cps.p ctcpf
  }
  IF (%_cps.par == 18) {
    _enab2
    dialog -t $dname Editing revolving doors Flood kick Settings for %_cps
    did -ra $dname 3 Parts in
    did -ra $dname 7 Sec
    did -ra $dname 55 In first box enter the number of parts. In second box enter the number of seconds nick should do above in. $str($chr(160),3) NOTE:- don't leave the edit boxes blank, this might cause an error in script.
    did -ra $dname 6,500 Nick Flood kick
    set %_cps.p door
    did -b $dname 101
  }
  IF ((%_cps.par != $null) && (%_cps.p != $null)) {
    set %_cps. [ $+ [ %_cps.p ] ] $cps.rvi(%_cps,%_cps.p)
    did -ra $dname 1 %_cps. [ $+ [ %_cps.p ] ]
    dobans $dname
    IF ($cps.rvi(%_cps,$+(%_cps.p,.time)) != $null) { did -ra $dname 2 $cps.rvi(%_cps,$+(%_cps.p,.time)) }
    IF ($cps.rvi(%_cps,$+(%_cps.p,.ktrig)) == auto) { did -c $dname 100 }
    IF ($cps.rvi(%_cps,$+(%_cps.p,.ktrig)) == manual) { did -c $dname 101 }
    IF ($cps.rvi(%_cps,$+(%_cps.p,.kact)) == kick) {
      did -c $dname 102
      did -br $dname 200,201
    }
    IF ($cps.rvi(%_cps,$+(%_cps.p,.kact)) == kickban) {
      did -c $dname 103
      did -e $dname 200,201
    }
    IF (($cps.rvi(%_cps,$+(%_cps.p,.ktime)) != $null) && ($cps.rvi(%_cps,$+(%_cps.p,.kact)) != kick)) { did -ra $dname 200 $cps.rvi(%_cps,$+(%_cps.p,.ktime)) }
    IF (($cps.rvi(%_cps,$+(%_cps.p,.ktype)) != $null) && ($cps.rvi(%_cps,$+(%_cps.p,.kact)) != kick)) { did -c $dname 201 $cps.rvi(%_cps,$+(%_cps.p,.ktype)) }
    IF ($cps.rvi(%_cps,$+(%_cps.p,.kmsg)) != $null) { did -ra $dname 202 $cps.rvi(%_cps,$+(%_cps.p,.kmsg)) }
  }
}
ON *:DIALOG:CPS.GEN2:SCLICK:102: { did -br $dname 200,201 }
ON *:DIALOG:CPS.GEN2:MENU:11: {
  echo $color(info2) $_place $_time *** 4(CPS) Current item in %_cps.p is -> $did(1).text
  echo $color(info2) $_place $_time *** 4(CPS) Current time to perform %_cps.p is -> $duration($did(2).text)
  IF ($did(100).state == 1) { echo $color(info2) $_place $_time *** 4(CPS) Nick will be automatically kicked from the channel }
  IF ($did(101).state == 1) { echo $color(info2) $_place $_time *** 4(CPS) On offence CPS will activate an fkey(F9) which u can hit on your will to kick the user }
  IF ($did(102).state == 1) { echo $color(info2) $_place $_time *** 4(CPS) Offender will be only kicked from %_cps on breaking rule. }
  IF ($did(103).state == 1) { echo $color(info2) $_place $_time *** 4(CPS) Offender will be kicked banned from %_cps $+ , ban time:- $duration($did(200).text) $+ , ban type:- $did(201).text $+ , with the kick message -> $did(202).text }
  linesep
  echo $color(info2) $_place $_time *** 4(CPS) End of status report!
}
ON *:DIALOG:CPS.GEN2:MENU:15: {
  unset %_cps.par
  unset %_cps.p
  cps.save %_cps
  dialog -x $dname
  _cps
}
ON *:DIALOG:CPS.GEN2:SCLICK:103: {
  did -e $dname 200,201
  dobans $dname
  IF ($cps.rvi(%_cps,$+(%_cps.p,.ktime)) != $null) { did -ra $dname 200 $cps.rvi(%_cps,$+(%_cps.p,.ktime)) }
  IF ($cps.rvi(%_cps,$+(%_cps.p,.ktype)) != $null) { did -c $dname 201 $cps.rvi(%_cps,$+(%_cps.p,.ktype)) }
}
ON *:DIALOG:CPS.GEN2:SCLICK:4: {
  IF ((%_cps.par != $null) && (%_cps.p != $null)) {
    unset %_cps. [ $+ [ %_cps.p ] ]
    set %_cps. [ $+ [ %_cps.p ] ] $did(1).text
    IF (%_cps. [ $+ [ %_cps.p ] ] != $null) { cps.rvs %_cps %_cps.p %_cps. [ $+ [ %_cps.p ] ] }
    IF ($did(2).text != $null) { cps.rvs %_cps $+(%_cps.p,.time) $did(2).text }
    IF ($did(100).state == 1) { cps.rvs %_cps $+(%_cps.p,.ktrig) auto }
    IF ($did(101).state == 1) { cps.rvs %_cps $+(%_cps.p,.ktrig) manual }
    IF ($did(102).state == 1) { cps.rvs %_cps $+(%_cps.p,.kact) kick }
    IF ($did(103).state == 1) { cps.rvs %_cps $+(%_cps.p,.kact) kickban }
    IF ($did(200).text != $null) { cps.rvs %_cps $+(%_cps.p,.ktime) $did(200).text }
    IF ($did(201).text != $null) { cps.rvs %_cps $+(%_cps.p,.ktype) $did(201).text }
    IF ($did(202).text != $null) { cps.rvs %_cps $+(%_cps.p,.kmsg) $did(202).text }
    ELSE { echo $color(info) $_place $_time 10Error no kick message was set, *Resetting* last message! }
    unset %_cps.par
    unset %_cps.p
    cps.save %_cps
    dialog -x $dname
    _cps
  }
}
ON *:DIALOG:CPS.GEN2:SCLICK:8: { _cps }


; General settings 3
ON *:DIALOG:CPS.GEN3:INIT:0:{
  IF (%_cps.par == 19) {
    _enab3
    dialog -t $dname Editing Long Text kick Settings for %_cps
    did -ra $dname 6,500 Long Text kick
    set %_cps.p longtxt
    did -ra $dname 55 In the above text box enter the maximum number of letters alphabets allowed in %_cps in one single line. $str($chr(160),3) NOTE:- don't leave the edit boxes blank, this might cause an error in script.
  }
  IF (%_cps.par == 20) {
    _enab3
    dialog -t $dname Editing Punctuations kick Settings for %_cps
    did -ra $dname 6,500 Punctuations kick
    set %_cps.p punctuation
    did -ra $dname 55 In the above text box enter the maximum number of punctuations allowed in %_cps in one single line. $str($chr(160),3) NOTE:- don't leave the edit boxes blank, this might cause an error in script.
  }
  IF (%_cps.par == 21) {
    _enab3
    dialog -t $dname Editing Caps kick Settings for %_cps
    did -ra $dname 6,500 Caps kick
    set %_cps.p caps
    did -ra $dname 55 In the above text box enter the percentage of caps allowed in %_cps in one single line. $str($chr(160),3) NOTE:- don't leave the edit boxes blank, this might cause an error in script.
  }
  IF (%_cps.par == 22) {
    _enab3
    dialog -t $dname Editing Colors kick Settings for %_cps
    did -ra $dname 6,500 Colors kick
    set %_cps.p colors
    did -ra $dname 55 In the above text box enter the maximum number of colors allowed in %_cps in one single line. $str($chr(160),3) NOTE:- don't leave the edit boxes blank, this might cause an error in script.
  }
  IF (%_cps.par == 23) {
    _enab3
    dialog -t $dname Editing Clones kick Settings for %_cps
    did -ra $dname 6,500 Clones kick
    set %_cps.p clones
    did -b $dname 101
    did -ra $dname 55 In the above text box enter the maximum number of clones allowed in %_cps $+ . $str($chr(160),3) NOTE:- don't leave the edit boxes blank, this might cause an error in script.
  }
  IF (%_cps.par == 24) {
    _enab3
    dialog -t $dname Editing Non Letters kick Settings for %_cps
    did -ra $dname 6,500 Non Letters kick
    set %_cps.p nonletters
    did -ra $dname 55 In the above text box enter the maximum percentage of nonletters allowed in %_cps in one single line. $str($chr(160),3) NOTE:- don't leave the edit boxes blank, this might cause an error in script.
  }
  IF (%_cps.par == 36) {
    _enab3
    dialog -t $dname Editing Idle Nick kick Settings for %_cps
    did -ra $dname 6,500 Idle Nick kick
    set %_cps.p idle
    did -ra $dname 55 In the above text box enter the time *IN MINS* for which a nick should idle in a channel. $str($chr(160),3) NOTE:- don't leave the edit boxes blank or put a *ZERO*, this might cause an error in script.
  }
  IF ((%_cps.par != $null) && (%_cps.p != $null)) {
    set %_cps. [ $+ [ %_cps.p ] ] $cps.rvi(%_cps,%_cps.p)
    did -ra $dname 1 %_cps. [ $+ [ %_cps.p ] ]
    dobans $dname
    IF ($cps.rvi(%_cps,$+(%_cps.p,.ktrig)) == auto) { did -c $dname 100 }
    IF ($cps.rvi(%_cps,$+(%_cps.p,.ktrig)) == manual) { did -c $dname 101 }
    IF ($cps.rvi(%_cps,$+(%_cps.p,.kact)) == kick) {
      did -c $dname 102
      did -br $dname 200,201
    }
    IF ($cps.rvi(%_cps,$+(%_cps.p,.kact)) == kickban) {
      did -c $dname 103
      did -e $dname 200,201
    }
    IF (($cps.rvi(%_cps,$+(%_cps.p,.ktime)) != $null) && ($cps.rvi(%_cps,$+(%_cps.p,.kact)) != kick)) { did -ra $dname 200 $cps.rvi(%_cps,$+(%_cps.p,.ktime)) }
    IF (($cps.rvi(%_cps,$+(%_cps.p,.ktype)) != $null) && ($cps.rvi(%_cps,$+(%_cps.p,.kact)) != kick)) { did -c $dname 201 $cps.rvi(%_cps,$+(%_cps.p,.ktype)) }
    IF ($cps.rvi(%_cps,$+(%_cps.p,.kmsg)) != $null) { did -ra $dname 202 $cps.rvi(%_cps,$+(%_cps.p,.kmsg)) }
  }
}
ON *:DIALOG:CPS.GEN3:SCLICK:102: { did -br $dname 200,201 }
ON *:DIALOG:CPS.GEN3:SCLICK:103: {
  did -e $dname 200,201
  dobans $dname
  IF ($cps.rvi(%_cps,$+(%_cps.p,.ktime)) != $null) { did -ra $dname 200 $cps.rvi(%_cps,$+(%_cps.p,.ktime)) }
  IF ($cps.rvi(%_cps,$+(%_cps.p,.ktype)) != $null) { did -c $dname 201 $cps.rvi(%_cps,$+(%_cps.p,.ktype)) }
}
ON *:DIALOG:CPS.GEN3:MENU:11: {
  echo $color(info2) $_place $_time *** 4(CPS) Current item in %_cps.p is -> $did(1).text
  IF ($did(100).state == 1) { echo $color(info2) $_place $_time *** 4(CPS) Nick will be automatically kicked from the channel }
  IF ($did(101).state == 1) { echo $color(info2) $_place $_time *** 4(CPS) On offence CPS will activate an fkey(F9) which u can hit on your will to kick the user }
  IF ($did(102).state == 1) { echo $color(info2) $_place $_time *** 4(CPS) Offender will be only kicked from %_cps on breaking rule. }
  IF ($did(103).state == 1) { echo $color(info2) $_place $_time *** 4(CPS) Offender will be kicked banned from %_cps $+ , ban time:- $duration($did(200).text) $+ , ban type:- $did(201).text $+ , with the kick message -> $did(202).text }
  linesep
  echo $color(info2) $_place $_time *** 4(CPS) End of status report!
}
ON *:DIALOG:CPS.GEN3:MENU:15: {
  unset %_cps.par
  unset %_cps.p
  cps.save %_cps
  dialog -x $dname
  _cps
}
ON *:DIALOG:CPS.GEN3:SCLICK:4: {
  IF ((%_cps.par != $null) && (%_cps.p != $null)) {
    unset %_cps. [ $+ [ %_cps.p ] ]
    set %_cps. [ $+ [ %_cps.p ] ] $did(1).text
    IF (%_cps. [ $+ [ %_cps.p ] ] != $null) { cps.rvs %_cps %_cps.p %_cps. [ $+ [ %_cps.p ] ] }
    IF ($did(100).state == 1) { cps.rvs %_cps $+(%_cps.p,.ktrig) auto }
    IF ($did(101).state == 1) { cps.rvs %_cps $+(%_cps.p,.ktrig) manual }
    IF ($did(102).state == 1) { cps.rvs %_cps $+(%_cps.p,.kact) kick }
    IF ($did(103).state == 1) { cps.rvs %_cps $+(%_cps.p,.kact) kickban }
    IF ($did(200).text != $null) { cps.rvs %_cps $+(%_cps.p,.ktime) $did(200).text }
    IF ($did(201).text != $null) { cps.rvs %_cps $+(%_cps.p,.ktype) $did(201).text }
    IF ($did(202).text != $null) { cps.rvs %_cps $+(%_cps.p,.kmsg) $did(202).text }
    ELSE { echo $color(info) $_place $_time 10Error no kick message was set, *Resetting* last message! }
    unset %_cps.par
    unset %_cps.p
    cps.save %_cps
    dialog -x $dname
    _cps
  }
}
ON *:DIALOG:CPS.GEN3:SCLICK:8: { _cps }

;general settings 4
ON *:DIALOG:CPS.GEN4:INIT:0:{
  IF (%_cps.par == 25) {
    _enab4
    dialog -t $dname Editing Non English text kick Settings for %_cps
    did -ra $dname 500 Non English text kick
    set %_cps.p atext
  }
  IF (%_cps.par == 26) {
    _enab4
    dialog -t $dname Editing Exploiting users kick Settings for %_cps
    did -ra $dname 500 Exploiting Users kick
    set %_cps.p euser
  }
  IF (%_cps.par == 27) {
    _enab4
    dialog -t $dname Editing Drone bot kick Settings for %_cps
    did -ra $dname 500 Drone bot kick
    set %_cps.p drone
  }
  IF (%_cps.par == 28) {
    _enab4
    dialog -t $dname Editing Guest Nick kick Settings for %_cps
    did -ra $dname 500 Guest Nick kick
    set %_cps.p guest
  }
  IF (%_cps.par == 29) {
    _enab4
    dialog -t $dname Editing Rejoin kick Settings for %_cps
    did -ra $dname 500 Rejoin kick
    set %_cps.p rejoin
  }
  IF (%_cps.par == 30) {
    _enab4
    dialog -t $dname Editing On Join Ctcp kick Settings for %_cps
    did -ra $dname 500 On Join Ctcp kick
    set %_cps.p ojctcp
  }
  IF (%_cps.par == 31) {
    _enab4
    dialog -t $dname Editing On Join Notice kick Settings for %_cps
    did -ra $dname 500 On Join Notice kick
    set %_cps.p ojnote
  }
  IF (%_cps.par == 32) {
    _enab4
    dialog -t $dname Editing On Join Message kick Settings for %_cps
    did -ra $dname 500 On Join Message kick
    set %_cps.p ojmsg
  }
  IF ((%_cps.par != $null) && (%_cps.p != $null)) {
    dobans $dname
    IF ($cps.rvi(%_cps,$+(%_cps.p,.ktrig)) == auto) { did -c $dname 100 }
    IF ($cps.rvi(%_cps,$+(%_cps.p,.ktrig)) == manual) { did -c $dname 101 }
    IF ($cps.rvi(%_cps,$+(%_cps.p,.kact)) == kick) {
      did -c $dname 102
      did -br $dname 200,201
    }
    IF ($cps.rvi(%_cps,$+(%_cps.p,.kact)) == kickban) {
      did -c $dname 103
      did -e $dname 200,201
    }
    IF (($cps.rvi(%_cps,$+(%_cps.p,.ktime)) != $null) && ($cps.rvi(%_cps,$+(%_cps.p,.kact)) != kick)) { did -ra $dname 200 $cps.rvi(%_cps,$+(%_cps.p,.ktime)) }
    IF (($cps.rvi(%_cps,$+(%_cps.p,.ktype)) != $null) && ($cps.rvi(%_cps,$+(%_cps.p,.kact)) != kick)) { did -c $dname 201 $cps.rvi(%_cps,$+(%_cps.p,.ktype)) }
    IF ($cps.rvi(%_cps,$+(%_cps.p,.kmsg)) != $null) { did -ra $dname 202 $cps.rvi(%_cps,$+(%_cps.p,.kmsg)) }
  }
}
ON *:DIALOG:CPS.GEN4:SCLICK:102: { did -br $dname 200,201 }
ON *:DIALOG:CPS.GEN4:SCLICK:103: {
  did -e $dname 200,201
  dobans $dname
  IF ($cps.rvi(%_cps,$+(%_cps.p,.ktime)) != $null) { did -ra $dname 200 $cps.rvi(%_cps,$+(%_cps.p,.ktime)) }
  IF ($cps.rvi(%_cps,$+(%_cps.p,.ktype)) != $null) { did -c $dname 201 $cps.rvi(%_cps,$+(%_cps.p,.ktype)) }
}
ON *:DIALOG:CPS.GEN4:MENU:11: {
  IF ($did(100).state == 1) { echo $color(info2) $_place $_time *** 4(CPS) Nick will be automatically kicked from the channel }
  IF ($did(101).state == 1) { echo $color(info2) $_place $_time *** 4(CPS) On offence CPS will activate an fkey(F9) which u can hit on your will to kick the user }
  IF ($did(102).state == 1) { echo $color(info2) $_place $_time *** 4(CPS) Offender will be only kicked from %_cps on breaking rule. }
  IF ($did(103).state == 1) { echo $color(info2) $_place $_time *** 4(CPS) Offender will be kicked banned from %_cps $+ , ban time:- $duration($did(200).text) $+ , ban type:- $did(201).text $+ , with the kick message -> $did(202).text }
  linesep
  echo $color(info2) $_place $_time *** 4(CPS) End of status report!
}
ON *:DIALOG:CPS.GEN4:MENU:15: {
  unset %_cps.par
  unset %_cps.p
  cps.save %_cps
  dialog -x $dname
  _cps
}
ON *:DIALOG:CPS.GEN4:SCLICK:4: {
  IF ((%_cps.par != $null) && (%_cps.p != $null)) {
    IF ($did(100).state == 1) { cps.rvs %_cps $+(%_cps.p,.ktrig) auto }
    IF ($did(101).state == 1) { cps.rvs %_cps $+(%_cps.p,.ktrig) manual }
    IF ($did(102).state == 1) { cps.rvs %_cps $+(%_cps.p,.kact) kick }
    IF ($did(103).state == 1) { cps.rvs %_cps $+(%_cps.p,.kact) kickban }
    IF ($did(200).text != $null) { cps.rvs %_cps $+(%_cps.p,.ktime) $did(200).text }
    IF ($did(201).text != $null) { cps.rvs %_cps $+(%_cps.p,.ktype) $did(201).text }
    IF ($did(202).text != $null) { cps.rvs %_cps $+(%_cps.p,.kmsg) $did(202).text }
    ELSE { echo $color(info) $_place $_time 10error no kick messge was set, *ReSetting* last message! }
    unset %_cps.par
    unset %_cps.p
    cps.save %_cps
    dialog -x $dname
    _cps
  }
}
ON *:DIALOG:CPS.GEN4:SCLICK:8: { _cps }

;general settings 5
ON *:DIALOG:CPS.GEN5:INIT:0:{
  IF (%_cps.par == 33) {
    _enab5
    dialog -t $dname Editing Kline ban Settings for %_cps
    did -ra $dname 500 On Kline ban
    set %_cps.p kline
  }
  IF (%_cps.par == 34) {
    _enab5
    dialog -t $dname Editing Excess Flood Quit Ban Settings for %_cps
    did -ra $dname 500 Excess Flood Quit Ban
    set %_cps.p excess
  }
  IF (%_cps.par == 35) {
    _enab5
    dialog -t $dname Editing Spam Quit Ban Settings for %_cps
    did -ra $dname 500 Spam Quit Ban
    set %_cps.p squit
  }
  dobans $dname
  IF ($cps.rvi(%_cps,$+(%_cps.p,.ktrig)) == auto) { did -c $dname 100 }
  IF ($cps.rvi(%_cps,$+(%_cps.p,.ktrig)) == manual) { did -c $dname 101 }
  IF ($cps.rvi(%_cps,$+(%_cps.p,.ktime)) != $null) { did -ra $dname 200 $cps.rvi(%_cps,$+(%_cps.p,.ktime)) }
  IF ($cps.rvi(%_cps,$+(%_cps.p,.ktype)) != $null) { did -c $dname 201 $cps.rvi(%_cps,$+(%_cps.p,.ktype)) }
}
ON *:DIALOG:CPS.GEN5:MENU:11: {
  IF ($did(100).state == 1) { echo $color(info2) $_place $_time *** 4(CPS) Nick will be automatically banned from the channel }
  ELSE { echo $color(info2) $_place $_time *** 4(CPS) On offence CPS will activate an fkey(SHIFT + F9) which u can hit on your will to kick the user }
  echo $color(info2) $_place $_time *** 4(CPS) Offender will be banned from %_cps $+ , ban time:- $duration($did(200).text) $+ , ban type:- $did(201).text $+ .
  linesep
  echo $color(info2) $_place $_time *** 4(CPS) End of status report!
}
ON *:DIALOG:CPS.GEN5:MENU:15: {
  unset %_cps.par
  unset %_cps.p
  cps.save %_cps
  dialog -x $dname
  _cps
}
ON *:DIALOG:CPS.GEN5:SCLICK:4: {
  IF ((%_cps.par != $null) && (%_cps.p != $null)) {
    IF ($did(100).state == 1) { cps.rvs %_cps $+(%_cps.p,.ktrig) auto }
    IF ($did(101).state == 1) { cps.rvs %_cps $+(%_cps.p,.ktrig) manual }
    IF ($did(200).text != $null) { cps.rvs %_cps $+(%_cps.p,.ktime) $did(200).text }
    IF ($did(201).text != $null) { cps.rvs %_cps $+(%_cps.p,.ktype) $did(201).text }
    unset %_cps.par
    unset %_cps.p
    cps.save %_cps
    dialog -x $dname
    _cps
  }
}
ON *:DIALOG:CPS.GEN5:SCLICK:8: { _cps }

;spam detector
ON *:DIALOG:CPS.SPAM:INIT:0: {
  mdx.start
  mdx SetBorderStyle 14,100,10,99 staticedge
  mdx SetFont 14,100,10,99 12 400 verdana Bold
  did -b cps.spam 100,99
  var %m = $numtok(%spam.words,59)
  while (%m > 0) {
    did -a $dname 4 $gettok(%spam.words,%m,59)
    dec %m 1
  }
  IF (%_mspam == on) { did -c cps.spam 1 }
  ELSE { did -b cps.spam 4,7,8,9,100,99 }
  IF (%_mspam.kstatus == on) { did -c cps.spam 7 }
  IF (%_mspam.istatus == on) { did -c cps.spam 8 }
  IF (%_mspam.mstatus == on) { did -c cps.spam 9 }
}

ON *:DIALOG:CPS.SPAM:SCLICK:1: {
  IF ($did(1).state == 1) {
    set %_mspam on
    did -e cps.spam 4,7,8,9,100,99
  }
  ELSE {
    set %_mspam off
    did -b cps.spam 4,7,8,9,100,99
  }
}
ON *:DIALOG:CPS.SPAM:EDIT:4: {
  did -e $dname 100
  did -b $dname 99
}
ON *:DIALOG:CPS.SPAM:SCLICK:4: {
  did -e $dname 99
  did -b $dname 100
}
ON *:DIALOG:CPS.SPAM:SCLICK:100: {
  IF ($did(4).text) {
    did -a $dname 4 $did(4).text
    did -c $dname 4 $did(4,1)
    did -b $dname $did
  }
}
ON *:DIALOG:CPS.SPAM:SCLICK:99: {
  IF ($did(4,$did(4).sel)) {
    did -d $dname 4 $did(4).sel
    did -c $dname 4 $did(4,1)
    did -b $dname $did
  }
}
ON *:DIALOG:CPS.SPAM:SCLICK:10: {
  unset %spam.words
  var %i = $did(4).lines
  while (%i > 0) {
    set %spam.words $addtok(%spam.words,$did(4,%i),59)
    dec %i 1
  }
  $iif($window(@mspam) = @mspam,window -c @mspam) 
  dialog -x $dname 
  IF ($dialog(cps) == cps) { cps }
}
ON *:DIALOG:CPS.SPAM:SCLICK:7: {
  IF ($did(7).state == 1) { set %_mspam.kstatus on }
  ELSE { set %_mspam.kstatus off }
}
ON *:DIALOG:CPS.SPAM:SCLICK:8: {
  IF ($did(8).state == 1) { set %_mspam.istatus on }
  ELSE { set %_mspam.istatus off }
}
ON *:DIALOG:CPS.SPAM:SCLICK:9: {
  IF ($did(9).state == 1) { set %_mspam.mstatus on }
  ELSE { set %_mspam.mstatus off }
}
ON *:DIALOG:CPS.SPAM:SCLICK:14: { _mspam.help }

;warnings options
ON 1:DIALOG:CPS.WARN:INIT:0: {
  mdx.start
  mdx SetBorderStyle 15,200,201 staticedge
  mdx SetFont $dname 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17 12 400 tahoma
  mdx SetFont $dname 58 13 400 tahoma bold
  mdx MarkDialog $dname
  mdx SetMircVersion $version
  mdx SetControlMDX $dname 222 toolbar arrows nodivider flat noresize wrap > $shortfn($scriptdirbars.mdx)
  mdx SetBorderStyle 222
  did -i $dname 222 1 bmpsize 32 32
  did -i $dname 222 1 setimage +nh icon large $shortfn($scriptdircpslogo.ico)
  did -a $dname 222 +w 1 $chr(9) $+ CPS by Amit
  IF (%_cps.warn.swear == on) { did -c $dname 1 }
  IF (%_cps.warn.repeat == on) { did -c $dname 2 }
  IF (%_cps.warn.text == on) { did -c $dname 3 }
  IF (%_cps.warn.long == on) { did -c $dname 4 }
  IF (%_cps.warn.punctuation == on) { did -c $dname 5 }
  IF (%_cps.warn.caps == on) { did -c $dname 6 }
  IF (%_cps.warn.colors == on) { did -c $dname 7 }
  IF (%_cps.warn.url == on) { did -c $dname 8 }
  IF (%_cps.warn.chanads == on) { did -c $dname 9 }
  IF (%_cps.warn.non == on) { did -c $dname 10 }
  IF (%_cps.warn.sound == on) { did -c $dname 11 }
  IF (%_cps.warn.slap == on) { did -c $dname 12 }
  IF (%_cps.warn.user == on) { did -c $dname 13 }
  IF (%_cps.warn.channote == on) { did -c $dname 14 }
  IF (%_cps.warn.away == on) { did -c $dname 16 }
  IF (%_cps.warn.clone == on) { did -c $dname 17 }
  IF (%_cps.warn.noneng == on) { did -c $dname 21 }
}
ON 1:DIALOG:CPS.WARN:SCLICK:1: {
  IF ($did($dname,1).state == 1) { set %_cps.warn.swear on }
  ELSE { UNSET %_cps.warn.swear }
}
ON 1:DIALOG:CPS.WARN:SCLICK:2: {
  IF ($did($dname,2).state == 1) { set %_cps.warn.repeat on }
  ELSE { UNSET %_cps.warn.repeat }
}
ON 1:DIALOG:CPS.WARN:SCLICK:3: {
  IF ($did($dname,3).state == 1) { set %_cps.warn.text on }
  ELSE { UNSET %_cps.warn.text }
}
ON 1:DIALOG:CPS.WARN:SCLICK:4: {
  IF ($did($dname,4).state == 1) { set %_cps.warn.long on }
  ELSE { UNSET %_cps.warn.long }
}
ON 1:DIALOG:CPS.WARN:SCLICK:5: {
  IF ($did($dname,5).state == 1) { set %_cps.warn.punctuation on }
  ELSE { UNSET %_cps.warn.punctuation }
}
ON 1:DIALOG:CPS.WARN:SCLICK:6: {
  IF ($did($dname,6).state == 1) { set %_cps.warn.caps on }
  ELSE { UNSET %_cps.warn.caps }
}
ON 1:DIALOG:CPS.WARN:SCLICK:7: {
  IF ($did($dname,7).state == 1) { set %_cps.warn.colors on }
  ELSE { UNSET %_cps.warn.colors }
}
ON 1:DIALOG:CPS.WARN:SCLICK:8: {
  IF ($did($dname,8).state == 1) { set %_cps.warn.url on }
  ELSE { UNSET %_cps.warn.url }
}
ON 1:DIALOG:CPS.WARN:SCLICK:9: {
  IF ($did($dname,9).state == 1) { set %_cps.warn.chanads on }
  ELSE { UNSET %_cps.warn.chanads }
}
ON 1:DIALOG:CPS.WARN:SCLICK:10: {
  IF ($did($dname,10).state == 1) { set %_cps.warn.non on }
  ELSE { UNSET %_cps.warn.non }
}
ON 1:DIALOG:CPS.WARN:SCLICK:11: {
  IF ($did($dname,11).state == 1) { set %_cps.warn.sound on }
  ELSE { UNSET %_cps.warn.sound }
}
ON 1:DIALOG:CPS.WARN:SCLICK:12: {
  IF ($did($dname,12).state == 1) { set %_cps.warn.slap on }
  ELSE { UNSET %_cps.warn.slap }
}
ON 1:DIALOG:CPS.WARN:SCLICK:13: {
  IF ($did($dname,13).state == 1) { set %_cps.warn.user on }
  ELSE { UNSET %_cps.warn.user }
}
ON 1:DIALOG:CPS.WARN:SCLICK:14: {
  IF ($did($dname,14).state == 1) { set %_cps.warn.channote on }
  ELSE { UNSET %_cps.warn.channote }
}
ON 1:DIALOG:CPS.WARN:SCLICK:16: {
  IF ($did($dname,16).state == 1) { set %_cps.warn.away on }
  ELSE { UNSET %_cps.warn.away }
}
ON 1:DIALOG:CPS.WARN:SCLICK:17: {
  IF ($did($dname,17).state == 1) { set %_cps.warn.clone on }
  ELSE { UNSET %_cps.warn.clone }
}
ON 1:DIALOG:CPS.WARN:SCLICK:21: {
  IF ($did($dname,21).state == 1) { set %_cps.warn.noneng on }
  ELSE { UNSET %_cps.warn.noneng }
}
ON 1:DIALOG:CPS.WARN:SCLICK:15: {
  IF ($dialog(cps) == cps) { cps }
}
ON 1:DIALOG:CPS.WARN:SCLICK:200: {
  set %_cps.warn.noneng on
  set %_cps.warn.away on
  set %_cps.warn.caps on
  set %_cps.warn.chanads on
  set %_cps.warn.channote on
  set %_cps.warn.clone on
  set %_cps.warn.colors on
  set %_cps.warn.long on
  set %_cps.warn.non on
  set %_cps.warn.punctuation on
  set %_cps.warn.repeat on
  set %_cps.warn.slap on
  set %_cps.warn.sound on
  set %_cps.warn.swear on
  set %_cps.warn.text on
  set %_cps.warn.url on
  set %_cps.warn.user on
  did -c $dname 1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,21,200
  did -u $dname 201
}
ON 1:DIALOG:CPS.WARN:SCLICK:201: {
  UNSET %_cps.warn.*
  did -c $dname 201
  did -u $dname 1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,21,200
}

;about dialog
ON 1:DIALOG:_ABOUT:SCLICK:4: {
  dialog -x $dname
  IF ($dialog(cps) == cps) { cps }
}

;warningsmessage editor
ON 1:DIALOG:_WARNEDIT:INIT:0: {
  IF (%_cps.swear.warn != $null) { did -ra $dname 200 %_cps.swear.warn }
  ELSE { reset $dname 200 swear }
  IF (%_cps.repeat.warn != $null) { did -ra $dname 201 %_cps.repeat.warn }
  ELSE { reset $dname 201 repeat }
  IF (%_cps.text.warn != $null) { did -ra $dname 202 %_cps.text.warn }
  ELSE { reset $dname 202 text }
  IF (%_cps.long.warn != $null) { did -ra $dname 203 %_cps.long.warn }
  ELSE { reset $dname 203 long }
  IF (%_cps.punctuation.warn != $null) { did -ra $dname 204 %_cps.punctuation.warn }
  ELSE { reset $dname 204 punctuation }
  IF (%_cps.caps.warn != $null) { did -ra $dname 205 %_cps.caps.warn }
  ELSE { reset $dname 205 caps }
  IF (%_cps.colors.warn != $null) { did -ra $dname 206 %_cps.colors.warn }
  ELSE { reset $dname 206 colors }
  IF (%_cps.urlads.warn != $null) { did -ra $dname 207 %_cps.urlads.warn }
  ELSE { reset $dname 207 urlads }
  IF (%_cps.chanads.warn != $null) { did -ra $dname 208 %_cps.chanads.warn }
  ELSE { reset $dname 208 chanads }
  IF (%_cps.non.warn != $null) { did -ra $dname 209 %_cps.non.warn }
  ELSE { reset $dname 209 non }
  IF (%_cps.sounds.warn != $null) { did -ra $dname 210 %_cps.sounds.warn }
  ELSE { reset $dname 210 sounds }
  IF (%_cps.slaps.warn != $null) { did -ra $dname 211 %_cps.slaps.warn }
  ELSE { reset $dname 211 slaps }
  IF (%_cps.user.warn != $null) { did -ra $dname 212 %_cps.user.warn }
  ELSE { reset $dname 212 user }
  IF (%_cps.cnote.warn != $null) { did -ra $dname 213 %_cps.cnote.warn }
  ELSE { reset $dname 213 cnote }
  IF (%_cps.away.warn != $null) { did -ra $dname 214 %_cps.away.warn }
  ELSE { reset $dname 214 away }
  IF (%_cps.clone.warn != $null) { did -ra $dname 215 %_cps.clone.warn }
  ELSE { reset $dname 215 clone }
  IF (%_cps.noneng.warn != $null) { did -ra $dname 216 %_cps.noneng.warn }
  ELSE { reset $dname 216 noneng }
}
ON 1:DIALOG:_WARNEDIT:EDIT:200: {
  IF ($did(200).text != $null) { set %_cps.swear.warn $did(200).text }
}
ON 1:DIALOG:_WARNEDIT:EDIT:201: {
  IF ($did(201).text != $null) { set %_cps.repeat.warn $did(201).text }
}
ON 1:DIALOG:_WARNEDIT:EDIT:202: {
  IF ($did(202).text != $null) { set %_cps.text.warn $did(202).text }
}
ON 1:DIALOG:_WARNEDIT:EDIT:203: {
  IF ($did(203).text != $null) { set %_cps.long.warn $did(203).text }
}
ON 1:DIALOG:_WARNEDIT:EDIT:204: {
  IF ($did(204).text != $null) { set %_cps.punctuation.warn $did(204).text }
}
ON 1:DIALOG:_WARNEDIT:EDIT:205: {
  IF ($did(205).text != $null) { set %_cps.caps.warn $did(205).text }
}
ON 1:DIALOG:_WARNEDIT:EDIT:206: {
  IF ($did(206).text != $null) { set %_cps.colors.warn $did(206).text }
}
ON 1:DIALOG:_WARNEDIT:EDIT:207: {
  IF ($did(207).text != $null) { set %_cps.urlads.warn $did(207).text }
}
ON 1:DIALOG:_WARNEDIT:EDIT:208: {
  IF ($did(208).text != $null) { set %_cps.chanads.warn $did(208).text }
}
ON 1:DIALOG:_WARNEDIT:EDIT:209: {
  IF ($did(209).text != $null) { set %_cps.non.warn $did(209).text }
}
ON 1:DIALOG:_WARNEDIT:EDIT:210: {
  IF ($did(210).text != $null) { set %_cps.sounds.warn $did(210).text }
}
ON 1:DIALOG:_WARNEDIT:EDIT:211: {
  IF ($did(211).text != $null) { set %_cps.slaps.warn $did(211).text }
}
ON 1:DIALOG:_WARNEDIT:EDIT:212: {
  IF ($did(212).text != $null) { set %_cps.user.warn $did(212).text }
}
ON 1:DIALOG:_WARNEDIT:EDIT:213: {
  IF ($did(213).text != $null) { set %_cps.cnote.warn $did(213).text }
}
ON 1:DIALOG:_WARNEDIT:EDIT:214: {
  IF ($did(214).text != $null) { set %_cps.away.warn $did(214).text }
}
ON 1:DIALOG:_WARNEDIT:EDIT:215: {
  IF ($did(215).text != $null) { set %_cps.clone.warn $did(215).text }
}
ON 1:DIALOG:_WARNEDIT:EDIT:216: {
  IF ($did(216).text != $null) { set %_cps.noneng.warn $did(216).text }
}
ON 1:DIALOG:_WARNEDIT:SCLICK:103: {
  reset $dname 200 swear
  reset $dname 201 repeat
  reset $dname 202 text
  reset $dname 203 long
  reset $dname 204 punctuation
  reset $dname 205 caps
  reset $dname 206 colors
  reset $dname 207 urlads
  reset $dname 208 chanads
  reset $dname 209 non
  reset $dname 210 sounds
  reset $dname 211 slaps
  reset $dname 212 user
  reset $dname 213 cnote
  reset $dname 214 away
  reset $dname 215 clone
  reset $dname 216 noneng
}
ON 1:DIALOG:_WARNEDIT:SCLICK:104: {
  IF ($dialog(cps) == cps) { cps }
}

;private protection system
ON 1:DIALOG:PPS:INIT:0: {
  IF ($cps.rvi(default,pps1) == 1) { did -c $dname 1 }
  IF ($cps.rvi(default,pps2) == 1) { did -c $dname 2 }
  IF ($cps.rvi(default,pps3) == 1) { did -c $dname 3 }
  IF ($cps.rvi(default,pps4) == 1) { did -c $dname 4 }
  IF ($cps.rvi(default,pps5) == 1) { did -c $dname 5 }
  IF ($cps.rvi(default,pps6) == 1) { did -c $dname 6 }
  did -ra $dname 15 $cps.rvi(default,pps1t)
  did -ra $dname 16 $cps.rvi(default,pps1s) 
  did -ra $dname 17 $cps.rvi(default,pps1i) 
  did -ra $dname 18 $cps.rvi(default,pps1m)
  did -ra $dname 19 $cps.rvi(default,pps2t) 
  did -ra $dname 20 $cps.rvi(default,pps2s) 
  did -ra $dname 21 $cps.rvi(default,pps2i) 
  did -ra $dname 22 $cps.rvi(default,pps2m)
  did -ra $dname 23 $cps.rvi(default,pps3t) 
  did -ra $dname 24 $cps.rvi(default,pps3s) 
  did -ra $dname 25 $cps.rvi(default,pps3i) 
  did -ra $dname 26 $cps.rvi(default,pps3m)
  did -ra $dname 27 $cps.rvi(default,pps4t) 
  did -ra $dname 28 $cps.rvi(default,pps4s) 
  did -ra $dname 29 $cps.rvi(default,pps4i) 
  did -ra $dname 30 $cps.rvi(default,pps4m)
  did -ra $dname 31 $cps.rvi(default,pps5t) 
  did -ra $dname 32 $cps.rvi(default,pps5s) 
  did -ra $dname 33 $cps.rvi(default,pps5i) 
  did -ra $dname 34 $cps.rvi(default,pps5m)
  did -ra $dname 35 $cps.rvi(default,pps6t) 
  did -ra $dname 36 $cps.rvi(default,pps6s) 
  did -ra $dname 37 $cps.rvi(default,pps6i) 
  did -ra $dname 38 $cps.rvi(default,pps6m)
  IF ($cps.rvi(default,pps1c) == nothing) { did -c $dname 45 }
  IF ($cps.rvi(default,pps1c) == kickban) { did -c $dname 46 }
  IF ($cps.rvi(default,pps1c) == kick)    { did -c $dname 47 }
  IF ($cps.rvi(default,pps2c) == nothing) { did -c $dname 48 }
  IF ($cps.rvi(default,pps2c) == kickban) { did -c $dname 49 }
  IF ($cps.rvi(default,pps2c) == kick)    { did -c $dname 50 }
  IF ($cps.rvi(default,pps3c) == nothing) { did -c $dname 51 }
  IF ($cps.rvi(default,pps3c) == kickban) { did -c $dname 52 }
  IF ($cps.rvi(default,pps3c) == kick)    { did -c $dname 53 }
  IF ($cps.rvi(default,pps4c) == nothing) { did -c $dname 54 }
  IF ($cps.rvi(default,pps4c) == kickban) { did -c $dname 55 }
  IF ($cps.rvi(default,pps4c) == kick)    { did -c $dname 56 }
  IF ($cps.rvi(default,pps5c) == nothing) { did -c $dname 57 }
  IF ($cps.rvi(default,pps5c) == kickban) { did -c $dname 58 }
  IF ($cps.rvi(default,pps5c) == kick)    { did -c $dname 59 }
  IF ($cps.rvi(default,pps6c) == nothing) { did -c $dname 60 }
  IF ($cps.rvi(default,pps6c) == kickban) { did -c $dname 61 }
  IF ($cps.rvi(default,pps6c) == kick)    { did -c $dname 62 }
}
ON 1:DIALOG:PPS:SCLICK:700: { _help.ignore }
ON 1:DIALOG:PPS:SCLICK:701: { _help.mode }
ON 1:DIALOG:PPS:SCLICK:702: {
  dialog -i $dname
  pps.ex
}
ON 1:DIALOG:PPS:SCLICK:555: {
  IF ($did(1).state == 1) { cps.rvs default pps1 1 } 
  ELSE { cps.rvs default pps1 0 }
  IF ($did(2).state == 1) { cps.rvs default pps2 1 } 
  ELSE { cps.rvs default pps2 0 }
  IF ($did(3).state == 1) { cps.rvs default pps3 1 } 
  ELSE { cps.rvs default pps3 0 }
  IF ($did(4).state == 1) { cps.rvs default pps4 1 } 
  ELSE { cps.rvs default pps4 0 }
  IF ($did(5).state == 1) { cps.rvs default pps5 1 } 
  ELSE { cps.rvs default pps5 0 }
  IF ($did(6).state == 1) { cps.rvs default pps6 1 } 
  ELSE { cps.rvs default pps6 0 }
  IF ($did(15).text != $null) { cps.rvs default pps1t $did(15).text }
  IF ($did(16).text != $null) { cps.rvs default pps1s $did(16).text }
  IF ($did(17).text != $null) { cps.rvs default pps1i $did(17).text }
  IF ($did(18).text != $null) { cps.rvs default pps1m $did(18).text }
  IF ($did(19).text != $null) { cps.rvs default pps2t $did(19).text }
  IF ($did(20).text != $null) { cps.rvs default pps2s $did(20).text }
  IF ($did(21).text != $null) { cps.rvs default pps2i $did(21).text }
  IF ($did(22).text != $null) { cps.rvs default pps2m $did(22).text }
  IF ($did(23).text != $null) { cps.rvs default pps3t $did(23).text }
  IF ($did(24).text != $null) { cps.rvs default pps3s $did(24).text }
  IF ($did(25).text != $null) { cps.rvs default pps3i $did(25).text }
  IF ($did(26).text != $null) { cps.rvs default pps3m $did(26).text }
  IF ($did(27).text != $null) { cps.rvs default pps4t $did(27).text }
  IF ($did(28).text != $null) { cps.rvs default pps4s $did(28).text }
  IF ($did(29).text != $null) { cps.rvs default pps4i $did(29).text }
  IF ($did(30).text != $null) { cps.rvs default pps4m $did(30).text }
  IF ($did(31).text != $null) { cps.rvs default pps5t $did(31).text }
  IF ($did(32).text != $null) { cps.rvs default pps5s $did(32).text }
  IF ($did(33).text != $null) { cps.rvs default pps5i $did(33).text }
  IF ($did(34).text != $null) { cps.rvs default pps5m $did(34).text }
  IF ($did(35).text != $null) { cps.rvs default pps6t $did(35).text }
  IF ($did(36).text != $null) { cps.rvs default pps6s $did(36).text }
  IF ($did(37).text != $null) { cps.rvs default pps6i $did(37).text }
  IF ($did(38).text != $null) { cps.rvs default pps6m $did(38).text }
  IF ($did(45).state == 1) { cps.rvs default pps1c nothing }
  IF ($did(46).state == 1) { cps.rvs default pps1c kickban }
  IF ($did(47).state == 1) { cps.rvs default pps1c kick }
  IF ($did(48).state == 1) { cps.rvs default pps2c nothing }
  IF ($did(49).state == 1) { cps.rvs default pps2c kickban }
  IF ($did(50).state == 1) { cps.rvs default pps2c kick }
  IF ($did(51).state == 1) { cps.rvs default pps3c nothing }
  IF ($did(52).state == 1) { cps.rvs default pps3c kickban }
  IF ($did(53).state == 1) { cps.rvs default pps3c kick }
  IF ($did(54).state == 1) { cps.rvs default pps4c nothing }
  IF ($did(55).state == 1) { cps.rvs default pps4c kickban }
  IF ($did(56).state == 1) { cps.rvs default pps4c kick }
  IF ($did(57).state == 1) { cps.rvs default pps5c nothing }
  IF ($did(58).state == 1) { cps.rvs default pps5c kickban }
  IF ($did(59).state == 1) { cps.rvs default pps5c kick }
  IF ($did(60).state == 1) { cps.rvs default pps6c nothing }
  IF ($did(61).state == 1) { cps.rvs default pps6c kickban }
  IF ($did(62).state == 1) { cps.rvs default pps6c kick }
  cps.save default
  IF ($dialog(cps) == cps) { cps }
  dialog -x $dname 
}

; Spam bot settings
ON *:DIALOG:SB.SET:EDIT:1: {
  did -e $dname 2
  did -b $dname 3,306
}

ON *:DIALOG:SB.SET:SCLICK:1: {
  did -e $dname 3,306
  did -b $dname 2
  did -ra $dname 406 Cycle Time for Socket Bot in the channel $did(1).text
  did -ra $dname 306 $cps.rvi($did(1).text,sbhop)
}

ON *:DIALOG:SB.SET:SCLICK:2: {
  IF ($did(1).text) {
    IF ($istok($cps.rvi(default,controlchan),$did(1).text,44) == $true) {
      did -a $dname 1 $did(1).text
      did -c $dname 1 $did(1,1)
    }
    ELSE {
      echo $color(info2) $_place $_time 4*** (CPS) The Channel $did(1).text was not found in protected list.
    }
  }
}

ON *:DIALOG:SB.SET:SCLICK:3: {
  IF ($did(1,$did(1).sel)) {
    did -d $dname 1 $did(1).sel
    did -c $dname 1 $did(1,1)
  }
}

ON *:DIALOG:SB.SET:INIT:0: {
  mdx.start
  mdx SetBorderStyle 2,3,600,601 staticedge
  mdx SetFont $dname 400,401,402,403,404,405,406,407,408,500,10,50,51 13 400 tahoma bold
  mdx SetColor $dname 300,301,302,303,304,305,306,307,308 text $rgb(91,60,89)
  did -ra $dname 300 $sb_nick
  did -ra $dname 301 $sb_anick
  did -ra $dname 302 $sb_server
  did -ra $dname 303 $sb_name
  did -ra $dname 304 $sb_identd
  did -ra $dname 305 $sb_port
  did -ra $dname 308 $sb_partmsg
  did -b $dname 2,3,306
  echo $color(info2) $_place $_time 4*** (CPS) If you are using a registered nick for your BOT and you want to identify it see FAQ.txt On how to do it!!
  IF ($cps.rvi(default,sbjoin) == ALL) {
    did -c $dname 50
    didtok sb.set 1 44 $cps.rvi(default,controlchan)
  }
  ELSEIF ($cps.rvi(default,sbjoin) == NONE) {
    did -c $dname 500
    did -b $dname 50,51,1
  }
  ELSEIF ($cps.rvi(default,sbjoin) != $null) {
    did -c $dname 51
    didtok sb.set 1 44 $cps.rvi(default,sbjoin)
  }
  ELSE { return }
}

ON *:DIALOG:SB.SET:EDIT:306: {
  var %sbhop = $did(306).text
  cps.rvs $did(1).text sbhop %sbhop
}

ON *:DIALOG:SB.SET:SCLICK:50: {
  IF ($did(50).state == 1) {
    did -r $dname 1
    didtok sb.set 1 44 $cps.rvi(default,controlchan)
    did -b $dname 2,3,306
  }
}

ON *:DIALOG:SB.SET:SCLICK:51: {
  IF ($did(51).state == 1)  {
    did -r $dname 1
    IF ($cps.rvi(default,sbjoin) != ALL) { didtok sb.set 1 44 $cps.rvi(default,sbjoin) }
    did -b $dname 2,3,306
  }
}

ON *:DIALOG:SB.SET:SCLICK:500: {
  IF ($did(500).state == 1) {
    did -bu $dname 2,3,306,50,51
    did -r $dname 1
    IF ($_online) { sb_close }
  }
  ELSE {
    IF ($server != $null) { sb_open }
    did -e $dname 50,51,1
    IF ($cps.rvi(default,sbjoin) == ALL) {
      did -c $dname 50
      didtok sb.set 1 44 $cps.rvi(default,controlchan)
    }
    ELSEIF ($cps.rvi(default,sbjoin) != $null) {
      did -c $dname 51
      IF ($cps,rvi(default,sbjoin) == NONE) { didtok sb.set 1 44 $cps.rvi(default,sbjoin) }
    }
  }
}

ON *:DIALOG:SB.SET:SCLICK:600: {
  IF ($did(300).text != $null) { cps.rvs default sbnick $did(300).text }
  ELSE {
    echo $color(info2) $_place $_time 4*** (CPS) You Cannot Leave The Nick Field Blank
    return
  }
  IF ($did(301).text != $null) { cps.rvs default sbanick $did(301).text }
  ELSE {
    echo $color(info2) $_place $_time 4*** (CPS) You Cannot Leave The Alternative Nick Field Blank
    return
  }
  IF ($did(302).text != $null) { cps.rvs default sbserver $did(302).text }
  ELSE {
    echo $color(info2) $_place $_time 4*** (CPS) You Cannot Leave The Server Field Blank
    return
  }
  IF ($did(303).text != $null) { cps.rvs default sbname $did(303).text }
  ELSE {
    echo $color(info2) $_place $_time 4*** (CPS) You Cannot Leave The Name Field Blank
    return
  }
  IF ($did(304).text != $null) { cps.rvs default sbidentd $did(304).text }
  ELSE {
    echo $color(info2) $_place $_time 4*** (CPS) You Cannot Leave The Identd Field Blank
    return
  }
  IF ($did(305).text != $null) { cps.rvs default sbport $did(305).text }
  ELSE {
    echo $color(info2) $_place $_time 4*** (CPS) You Cannot Leave The Port Field Blank
    return
  }
  ;  IF ($did(307).text != $null) { cps.rvs default sbpass $did(307).text }
  IF ($did(308).text != $null) { cps.rvs default sbpartmsg $did(308).text }
  IF ($did(500).state == 1) {
    cps.rvs default sbjoin NONE
    dialog -x $dname
    IF ($dialog(cps) == cps) { cps }
    return
  }
  ELSE {
    IF ($did(50).state == 1) {
      cps.rvs default sbjoin ALL
      dialog -x $dname
      IF ($server != $null) { sb_open }
      IF ($dialog(cps) == cps) { cps }
      return
    }
    IF ($did(51).state == 1) {
      unset %_cps.sb
      var %i = $did(1).lines
      while (%i > 0) {
        set %_cps.sb $addtok(%_cps.sb,$did(1,%i),44)
        dec %i 1
      }
      IF (%_cps.sb == $null) {
        echo $color(info2) $_place $_time 4*** (CPS) You didn't mention any channels to join.
        return
      }
      ELSE {
        cps.rvs default sbjoin %_cps.sb
        IF ($server != $null) { sb_open }
        dialog -x $dname
        IF ($dialog(cps) == cps) { cps }
        return
      }
    }
  }
}

;pps exceptional nick list dialog
ON *:DIALOG:PPS.EX:INIT:0: {
  did -b $dname 2,3
  didtok $dname 1 59 $cps.rvi(default,$dname)
}
ON *:DIALOG:PPS.EX:EDIT:1: {
  did -e $dname 2
  did -b $dname 3
}

ON *:DIALOG:PPS.EX:SCLICK:1: {
  did -e $dname 3
  did -b $dname 2
}
ON *:DIALOG:PPS.EX:SCLICK:2: {
  IF ($did(1).text) {
    did -a $dname 1 $did(1).text
    did -c $dname 1 $did(1,1)
  }
}
ON *:DIALOG:PPS.EX:SCLICK:3: {
  IF ($did(1,$did(1).sel)) {
    did -d $dname 1 $did(1).sel
    did -c $dname 1 $did(1,1)
  }
}
ON *:DIALOG:PPS.EX:SCLICK:4: {
  unset %_cps.pps.ex
  var %i = $did(1).lines
  while (%i > 0) {
    set %_cps.pps.ex $addtok(%_cps.pps.ex,$did(1,%i),59)
    dec %i 1
  }
  IF (%_cps.pps.ex != $null) { cps.rvs default pps.ex %_cps.pps.ex  }
  ELSE {
    cps.rvs default pps.ex %_cps.pps.ex
    echo $color(info2) $_place $_time 4*** (CPS) The Exceptional nick list for PPS is now empty.
  }
  dialog -x $dname
  IF ($dialog(pps) == pps) { pps }  
}
;=======================================;
; :::          End Of File          ::: ;
;=======================================;
