mIRC Home    About    Download    Register    News    Help

Print Thread
#134134 29/10/05 05:10 AM
C
CraZyHanD
CraZyHanD
C
I have this so far
Code:
off 9:TEXT:.kick*:#: {
  if ($2 = $null) && ($nick isop #) { /Kick $chan $nick }
  elseif ($2 != $null) { /kick $chan $nick }
  else { HALT }
}

I want to make so when $nick presses .kick $nick2 , $nick2 can get kicked, but it dont work. Instead $nick gets kicked.
You get me?

#134135 29/10/05 05:15 AM
C
CraZyHanD
CraZyHanD
C
And another problem..
I have a bad connection so ghosts are often on my nicks.
When both my 1st and 2nd nicks are ghost i need to manually make a 3rd one.
is there a script like
Code:
on *:Connect: {
  if ($nick == mynick) ison (or something)
  { .msg /nick newnick }
}

If there is any other way you can think please tell me, cause everything i tried so far failed.

#134136 29/10/05 05:24 AM
Joined: Feb 2005
Posts: 342
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
You're using $nick to kick the nick, try using $2 instead.

also, your on text match should be:on *:text:.kick *:#:{ }

Edit, to address your second post:

When it tells you that the nick is in use, that is on a RAW event, /help raw events

Last edited by Rand; 29/10/05 05:27 AM.
#134137 29/10/05 06:40 AM
S
schaefer31
schaefer31
S
Nevermind this post, I was careless and didn't read everything.

Last edited by schaefer31; 29/10/05 06:58 AM.
#134138 29/10/05 06:47 AM
B
benjy355
benjy355
B
simplisity time:
Code:
[color:green]on[/color] 9:TEXT:.kick*:#: {
if ($nick isop $chan) { /Kick $chan $nick }
}

i have no idea why you wanted $2 variables in there...
hmm
My Kick
Code:
on *:kick:#: {
  if ($me == $knick) {
    join $chan
    /timer 1 1 /kick $chan $nick >=(
  }
  else {
    if ($nick == $me) halt
    /kick $chan $nick
  }
}

#134139 29/10/05 07:04 AM
S
schaefer31
schaefer31
S
Quote:
simplisity time:
Code:
[color:green]on[/color] 9:TEXT:.kick*:#: {
if ($nick isop $chan) { /Kick $chan $nick }
}

i have no idea why you wanted $2 variables in there...
hmm
My Kick
Code:
on *:kick:#: {
  if ($me == $knick) {
    join $chan
    /timer 1 1 /kick $chan $nick >=(
  }
  else {
    if ($nick == $me) halt
    /kick $chan $nick
  }
}


Ok, first of all the $2 in the script is the person being kicked so it should include a check to see that $2 is actually in the channel. Your code is also incorrect, because it will kick the person who did '.kick Someone' rather than kick 'Someone'.

Second, the kick script you have posted it not what he asked for.

Unless I misunderstood, this script will do what he is asking.
Code:
on @9:text:.kick *:#:{
  if ($2 != $null && $2 ison # && $nick isop #) { kick # $2 }
}


What's happening here...

@9 means the script will not trigger unless $nick has a userlevel of 9 and also that CraZyHanD is opped.

It also checks to see that there is a 'person' to kick and that 'person' is currently on the channel. Lastly it checks that the $nick who said the command is also an op on the channel. If all of these are true, then it kicks 'person'.

#134140 29/10/05 07:07 AM
B
benjy355
benjy355
B
...actually... wait don't they do the same thing?
because if $2 doesn't exist then it wouldn't be possible for the kick script to be set out, you'd just get a small error like
* kick: Insufficient Paramaters

#134141 29/10/05 07:10 AM
S
schaefer31
schaefer31
S
Technically, yes it will still work. However it's better to eliminate any possible error messages which I have done with the code I posted.


Link Copied to Clipboard