mIRC Home    About    Download    Register    News    Help

Print Thread
#193051 14/01/08 03:48 PM
Joined: Jan 2008
Posts: 44
J
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Jan 2008
Posts: 44
Hi people, i have took in alot about scripting, but i have come to a trouble point.

I have made this simple code.

Code:
on *:kick:#Channel: {
  if ($nick != $me) {
    .notice $nick You are not allowed to kick anyone from this channel.
  kick $nick }
}


What its sposed to do is;

- When somebody in that channel kicks somebody it kicked them to
- Also it displays the message

I keep getting a message saying

KICK Not enough parameters

Any ideas chaps?

Cheers.


#Plesh on QuaKenet
Jake Randall
Need help?
#Plesh - QuakeNet
Private Message Me Here!
jakerandall #193053 14/01/08 04:24 PM
Joined: Sep 2007
Posts: 65
X
Babel fish
Offline
Babel fish
X
Joined: Sep 2007
Posts: 65
Fixed:

Code:
on *:kick:#yourchan: {
  if ( $nick != $me ) {
    .notice $nick You are not allowed to kick anyone from this channel.
    kick $nick
  }
}

Last edited by XTZGZoReX; 14/01/08 04:26 PM.

GamerzWoW
The Official GamerzPlanet WoW Server
XTZGZoReX #193054 14/01/08 05:28 PM
Joined: Jan 2008
Posts: 3
T
Self-satisified door
Offline
Self-satisified door
T
Joined: Jan 2008
Posts: 3
Code:
on *:KICK:#:{
if ($nick != $me) { .notice $nick You are not allowed to kick anyone from this channel. | kick $chan $nick }
}


should work.

XTZGZoReX #193055 14/01/08 05:31 PM
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

Originally Posted By: XTZGZoReX

Fixed:


Yours is missing a parameter too, it's missing $chan. tordie's looks ok though, aside from those ugly pipes. smirk

Code:

on *:KICK:#Channel: {
  if ($nick != $me) {
    .notice $nick You are not allowed to kick anyone from this channel.
    kick # $nick
  }
}



RoCk #193059 14/01/08 05:50 PM
Joined: Jan 2008
Posts: 44
J
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Jan 2008
Posts: 44
Thankyou alot chaps it works fine.
I now understand where i went wrong.
Cheers again.

Last edited by jakerandall; 14/01/08 05:50 PM.

#Plesh on QuaKenet
Jake Randall
Need help?
#Plesh - QuakeNet
Private Message Me Here!
RoCk #193062 14/01/08 05:57 PM
Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
Pipes are not so ugly smile but here, you don't need more than one line :

Code:
on !*:kick:#channel:kick # $nick You are not allowed to kick anyone in this channel.

The notice is useless, simply put the reason in the /kick command (for the OP)


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #193064 14/01/08 05:59 PM
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

Originally Posted By: Wims

The notice is useless, simply put the reason in the /kick command


Very true.

RoCk #193143 15/01/08 02:25 PM
Joined: Jan 2008
Posts: 44
J
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Jan 2008
Posts: 44
Ok what about is there anyway to kick on reason

so they can actually see it
Code:
on *:KICK:#channel: {
  if ($nick != $me) {
    .notice $nick You are not allowed to kick anyone from this channel.
    kick # $nick
  }


tbh i have no idea how you would set it.


#Plesh on QuaKenet
Jake Randall
Need help?
#Plesh - QuakeNet
Private Message Me Here!
jakerandall #193144 15/01/08 02:30 PM
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

Check out Wims' post above, it does exactly that.

~ Edit ~
Modified a tiny bit...


Code:

on !@*:KICK:#channel: {
  kick # $nick You are not allowed to kick anyone on this channel.
}



RoCk #193156 15/01/08 06:05 PM
Joined: Jan 2008
Posts: 44
J
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Jan 2008
Posts: 44
Ok sorry to be a pain but what if i wanted it to ban with a reason.
Would i just replave the kick with a +b?
e.g.
Code:
on !*:kick:#Plesh:+b # $nick You are not allowed to kick anyone in this channel.
}


#Plesh on QuaKenet
Jake Randall
Need help?
#Plesh - QuakeNet
Private Message Me Here!
jakerandall #193158 15/01/08 06:09 PM
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

Then you could use the /ban command with the -k (kick) switch ...

Code:

on !@*:KICK:#Plesh: {
   ban -k # $nick 3 You are not allowed to kick anyone on this channel.
}



/help /ban

RoCk #193161 15/01/08 07:08 PM
Joined: Jan 2008
Posts: 44
J
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Jan 2008
Posts: 44
Ok cheers people it all works fine thankyou again laugh


#Plesh on QuaKenet
Jake Randall
Need help?
#Plesh - QuakeNet
Private Message Me Here!
jakerandall #193590 22/01/08 01:59 AM
Joined: Jan 2008
Posts: 1
J
Mostly harmless
Offline
Mostly harmless
J
Joined: Jan 2008
Posts: 1
well this should work



on @*:KICK:#: {
if ($knick == $me && $nick != ChanServ) {
chanserv $chan delban $me
chanserv $chan k $nick Attack at Will!! how dare you!!!
join $chan
}
}



john12345oo #193591 22/01/08 02:34 AM
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

Did you reply on the right thread?


Link Copied to Clipboard