CharmedOne Posted January 2, 2009 Report Share Posted January 2, 2009 (edited) Can someone help fix my protection to read words i put into my dialog ? Dialog & all works but the spam protection dosent seem to want to work. menu * { Spam Kick: { dialog -m SpamKick SpamKick } } dialog SpamKick { title "Spam Kicker" size -1 -1 197 111 option dbu list 1, 7 11 125 77, sort size vsbar box "", 2, 3 3 183 94 button "Add URL", 3, 142 12 37 12 button "Delete URL", 4, 142 28 37 12 button "Ok/Cancel", 5, 142 76 37 12, ok cancel button "Turn On", 6, 142 44 37 12 button "Turn Off", 7, 142 60 37 12 } on *:dialog:SpamKick:init:*: { /loadbuf -ro SpamKick 1 settings\spam.ini } alias spam { /set %spam $$?="Add Spam URL Here" /write settings\spam.ini %spam /loadbuf -ro SpamKick 1-- settings\spam.ini } on *:Dialog:SpamKick:sclick:1: { /set %sel.text $did(1).seltext } on *:Dialog:SpamKick:sclick:3: { /spam } on *:Dialog:SpamKick:sclick:4: { /write -ds $+ %sel.text settings\spam.ini | /loadbuf -ro SpamKick 1 settings\spam.ini } on *:Dialog:SpamKick:sclick:*:{ if ($did == 6) { .enable #spamkicker | echo -a Spam Kick Enabled } if ($did == 7) { .disable #spamkicker | echo -a Spam Kick Disabled } } #spamkicker on on *:TEXT:*:#: { if ($nick isop $chan) return { if ($nick isop #) return { if ($nick !isowner $chan) { var %i = 1 while (%i < $lines(spam.ini)) { if ($read(settings\spam.ini,%I) isin $1-) { /kick # $nick :No Spamming .raw access # add deny $+(*!*, $Ial($nick).addr) 1 : $+ %Nick Spamming } inc %i } } } } } on ^*:ACTION:*:#: { if ($nick isop $chan) return { if ($nick isop #) return { if ($nick !isowner $chan) { var %i = 1 while (%i < $lines(spam.ini)) { if ($read(settings\spam.ini,%I) isin $1-) { /kick # $nick :No Spamming .raw access # add deny $+(*!*, $Ial($nick).addr) 1 : $+ %Nick Spamming } inc %i } } } } } on *:CTCPREPLY:*:#: { if ($nick !isowner $chan) { var %i = 1 while (%i < $lines(spam.ini)) { if ($read(settings\spam.ini,%I) isin $1-) { /kick # $nick :No Spamming .raw access # add deny $+(*!*, $Ial($nick).addr) 1 : $+ %Nick Spamming } inc %i } } } #spamkicker end Edited January 2, 2009 by CharmedOne Link to comment Share on other sites More sharing options...
Guest X-Fusion Posted January 2, 2009 Report Share Posted January 2, 2009 on *:dialog:SpamKick:init:*: { /loadbuf -ro SpamKick settings\spam.txt } Not sure why you had the 1 in there. Link to comment Share on other sites More sharing options...
CharmedOne Posted January 2, 2009 Author Report Share Posted January 2, 2009 spam.ini is what that part should of been it loads the urls added in the list box , that dosent effect the protection not reading from the ini tho. Ill fix that one part, but will still need help getting protection to read the ini file. Link to comment Share on other sites More sharing options...
Warrior124 Posted January 2, 2009 Report Share Posted January 2, 2009 (edited) For one thing you had... if ($nick isop $chan) return { if ($nick isop #) return { ...which would probably cause problems. Try this... menu * { Spam Kick: { dialog -m SpamKick SpamKick } } dialog SpamKick { title "Spam Kicker" size -1 -1 197 111 option dbu list 1, 7 11 125 77, sort size vsbar box "", 2, 3 3 183 94 button "Add URL", 3, 142 12 37 12 button "Delete URL", 4, 142 28 37 12 button "Ok/Cancel", 5, 142 76 37 12, ok cancel button "Turn On", 6, 142 44 37 12 button "Turn Off", 7, 142 60 37 12 } on *:dialog:SpamKick:init:*: { /loadbuf -ro SpamKick 1 settings\spam.ini } alias spam { /set %spam $$?="Add Spam URL Here" /write settings\spam.ini %spam /loadbuf -ro SpamKick 1-- settings\spam.ini } on *:Dialog:SpamKick:sclick:1: { /set %sel.text $did(1).seltext } on *:Dialog:SpamKick:sclick:3: { /spam } on *:Dialog:SpamKick:sclick:4: { /write -ds $+ %sel.text settings\spam.ini | /loadbuf -ro SpamKick 1 settings\spam.ini } on *:Dialog:SpamKick:sclick:*:{ if ($did == 6) { .enable #spamkicker | echo -a Spam Kick Enabled } if ($did == 7) { .disable #spamkicker | echo -a Spam Kick Disabled } } #spamkicker on on *:TEXT:*:#: { if ($nick !isowner $chan) || ($nick !isop $chan) { var %i = 1 while (%i < $lines(spam.ini)) { if ($read(settings\spam.ini,%I) isin $1-) { /kick # $nick :No Spamming .raw access # add deny $+(*!*, $Ial($nick).addr) 1 : $+ %Nick Spamming } inc %i } } } on ^*:ACTION:*:#: { if ($nick !isowner $chan) || ($nick !isop $chan) { var %i = 1 while (%i < $lines(spam.ini)) { if ($read(settings\spam.ini,%I) isin $1-) { /kick # $nick :No Spamming .raw access # add deny $+(*!*, $Ial($nick).addr) 1 : $+ %Nick Spamming } inc %i } } } on *:CTCPREPLY:*:#: { if ($nick !isowner $chan) { var %i = 1 while (%i < $lines(spam.ini)) { if ($read(settings\spam.ini,%I) isin $1-) { /kick # $nick :No Spamming .raw access # add deny $+(*!*, $Ial($nick).addr) 1 : $+ %Nick Spamming } inc %i } } } #spamkicker end Edited January 2, 2009 by Warrior124 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now