mIRC Home    About    Download    Register    News    Help

Print Thread
I need help with a kick system please ! #10694 11/02/03 08:28 PM
Joined: Jan 2003
Posts: 22
M
Marco Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Jan 2003
Posts: 22
Hi Im trying to do a kick system basically you can add a nick and a word when that nick says that word he will gonna get kicked from the channel!
I almost got it I think but now even when the nick doesn't say the word is kicking him here is the code I have at moment:
Code:
alias kicklist { dialog -m kick kick }
dialog kick {
  title "Kick"
  size -1 -1 160 260
  option pixels
  icon $mircdir\system\skull9.ico, 0
  button "ok", 1, 100 240 60 20, OK
  combo 10, 10 40 140 110, vsbar
  box "Nicks", 3, 1 5 157 142
  box "Word", 4, 1 170 157 66
  edit "", 15, 10 195 140 20, autohs
  button "add", 6, 5 151 50 17
  button "del", 7, 55 151 50 17
  button "clear", 8, 105 151 50 17
  button "help", 9, 10 240 60 20
  text "*click add to begin*", 11, 29 20 130 20
}

on *:dialog:kick:init:0:{ .timer -m 1 2 linecombo }
on *:dialog:kick:sclick:*:{
  if ($did == 9) { dialog -m kickhelp kickhelp }
  if ($did == 7) { .timer -m 1 2 delkicknick }
  if ($did == 10) {  set %temp $readini system\kicknicks.ini kick $read -l $+ $did(kick,10).sel system\kick.ini | set %temp2 $read -l $+ $did(kick,10).sel system\kick.ini  | did -r kick 15 | if (%temp = $null) goto end | did -a kick 15 %temp | :end }
  if ($did == 6) {  .timer -m 1 20 kickaddnick }
  if ($did == 8) { /write -c system\kicknicks.ini | /write -c system\kick.ini | unset %temp | unset %kickcmsg | /did -r kick 10 $did(10).text }
}
dialog kickhelp {
  size -1 -1 300 135
  title "Kick Help"
  button "Close",1, 225 115 65 20, CANCEL
  box "Kick Help",2, 5 5 285 105
  text "Simply click the add button and you will be prompted for a Nickname.  (Nicknames can't have spaces)  After the name is added, click the name in the list and type in a word in the edit box at the bottom.  Hitting clear will remove all of the Magic Kicks nicks and their messages.",3, 20 25 250 79
}
on *:dialog:kick:edit:*:{ set %temp $did(kick,15).text | if (%temp = $null) goto end | writeini system\kicknicks.ini kick $did(kick,10) $did(kick,15) | :end }
alias delkicknick { set %temp $did(kick,10).sel | if (%temp = $null) goto end | set %temp $?!"Are you sure?" | if (%temp = $false) goto end | write -dl $+ $did(kick,10).sel system\kick.ini | remini system\kicknicks.ini kick $did(kick,10) | did -r kick 10,15 | linecombo | :end }
alias kickaddnick { set %temp $?="Nickname" | if (%temp = $null) goto end | write system\kick.ini %temp | did -a kick 10 %temp | :end }
alias linecombo { if ($exists(system\kick.ini) = $false) write -c system\kick.ini | set %loop 0 | :start | inc %loop 1 | set %temp $read -l $+ %loop system\kick.ini | if (%temp = $null) goto end | did -a kick 10 %temp | goto start | :end | unset %loop }

on @*:TEXT:*:#:{ 
  if ($readini system\kicknicks.ini kick $nick == $null) { goto end } 
  kick $chan $nick  Arent you proud.... you're in the  Kick list!
  :end 
}


how I can make it read the list and only kick if the nick said that word? Thanks in advance for the help!

Re: I need help with a kick system please ! #10695 11/02/03 11:27 PM
Joined: Feb 2003
Posts: 71
P
Phant0m Offline
Babel fish
Offline
Babel fish
P
Joined: Feb 2003
Posts: 71
Hey Marco

In Reference to the ON TEXT Event, use this;

on @*:TEXT:*:#:$iif($readini(system\kicknicks.ini,KICK,$nick),kick $chan $nick Aren’t you proud.... you're in the Kick list!)

smile


Kn0wledge Is Thee P0wer!!!!
Re: I need help with a kick system please ! #10696 11/02/03 11:45 PM
Joined: Jan 2003
Posts: 22
M
Marco Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Jan 2003
Posts: 22
hi thanks but still kicks the nick even when he doesn't say the word what Im trying to do is for example: if I add teh nick Prannock and specify that the word he can't say is cunt the system only kick when he says it !
But at moment the code keeps kicking when he re join even if he dosn't say the word assigned to him frown


Re: I need help with a kick system please ! #10697 12/02/03 12:11 AM
Joined: Feb 2003
Posts: 71
P
Phant0m Offline
Babel fish
Offline
Babel fish
P
Joined: Feb 2003
Posts: 71
Hey Marco

I can ensure you in Reference to the ON TEXT Event; it does what you were trying to get it to do… And this is not an ON JOIN Event so if it’s kicking people even ON JOIN then makes sure there’s no confliction between other codes, check all other ON JOIN Events, Timers and so forth…


Kn0wledge Is Thee P0wer!!!!
Re: I need help with a kick system please ! #10698 12/02/03 01:06 AM
Joined: Dec 2002
Posts: 1,237
T
The_Game Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 1,237
I do not know how helpful this could be but you could make something work by putting someone on a certain access list by typing the /auser or /guser command

I will do an /guser command cause it looks up the userhost anyways.

/guser Loser <nickname>

Notice the part that says LOSER (i used that as an example access type you can use whatever) this will put him/her in the userlist (assuming you know where it is) so if you want to kick them by doing an ON JOIN then you would do this

on Loser:JOIN:#:/mode $chan +b $nick | /kick $chan $nick | /notice $nick You are not on my list go back to the end of the line
}

so when they try to join this will ban and kick them with a nice little message and remain in effect as long as you or say a bot is in a channel with this implemented into the script.

But remember there are many ways around a ban...so it may not always work you would have to keep adding that person to the list each time the IP changes....

to remove that person from the designated "VIP LIST" you would do this:

/ruser Loser <nickname[color:blue]!> [/color]

now notice the exclamation mark at the end of the nickname...that just tells it to remove the person from ALL Levels......

I hope this is a little helpful to ya....I know its cheap but it does the trick smile



Re: I need help with a kick system please ! #10699 12/02/03 01:07 AM
Joined: Jan 2003
Posts: 22
M
Marco Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Jan 2003
Posts: 22
hi again I disable all the on join events and to be sure I tried the script on a clean mirc and still doesn't work right frown

Re: I need help with a kick system please ! #10700 12/02/03 01:40 AM
Joined: Dec 2002
Posts: 699
N
Nimue Offline
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
You should (at the least) change the $read()'s and $readini()'s to the format introduced in v5.9 (see /help $read, /help $readini), and the '/goto :loops' should be replaced with 'while ()' loops as introduced in v5.7 (see /help /while).
Also there is an overuse of pipes, making the code look ugly and very hard to read.

From what I see (without sifting through all the piped garbage laugh), it looks as if the "magic word" is the value in kicknicks.ini|nick, if that is the case, then the following should do what you want.
Code:
on @*:TEXT:*:#:{
   if $istok($strip($1-),$readini(system\kicknicks.ini,kick,$nick),32) {
     kick $chan $nick  Arent you proud.... you're in the  Kick list!
   }
}


Re: I need help with a kick system please ! #10701 12/02/03 02:12 AM
Joined: Jan 2003
Posts: 22
M
Marco Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Jan 2003
Posts: 22
lol thanks for the tips and the code it works now ! grin

Last edited by Marco; 12/02/03 02:12 AM.