mIRC Home    About    Download    Register    News    Help

Print Thread
#123674 26/06/05 01:44 AM
Joined: Jun 2005
Posts: 16
T
tyler22 Offline OP
Pikka bird
OP Offline
Pikka bird
T
Joined: Jun 2005
Posts: 16
i have one more ? its not big and it uses timers....if lets say someone said !kill and was an op the bot would kick them but would first let them read some text so how would i get it to give an amount of time before the bot kicks them.

thanx


-tyler
#123675 26/06/05 02:41 AM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
on *:TEXT:!kill:#yourchan:{
if ($nick isop $chan) {
.play $nick kill.txt
.timerkill 1 35 kick $chan $nick
}
}
set the time delay by changing the 35

#123676 26/06/05 06:36 AM
Joined: Jun 2005
Posts: 16
T
tyler22 Offline OP
Pikka bird
OP Offline
Pikka bird
T
Joined: Jun 2005
Posts: 16
thanks wat if u wanted only half ops to do something only they could do...something funny in the msg and kick to


-tyler
#123677 26/06/05 09:09 AM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
I would look up the operator for it in the mIRC help files and add it in the code you were given
Quote:

If-then-else statements

The If-then-else statement allows you to compare values and execute different parts of a script based on that comparison.

Basic format

if (v1 operator v2) { commands }
elseif (v1 operator v2) { commands }
else { commands }

The ( ) brackets enclose comparisons, whereas the { } brackets enclose the commands you want to be performed if a comparison is true. You must make sure that the number of ( ) and { } brackets match to make sure that the correct comparisons are made, and that the correct commands are executed.

Using brackets speeds up processing. If an alias uses too few brackets then the statement might be ambiguous and the alias will take longer to parse, might be parsed incorrectly, or might not be parsed at all.

You can nest as many if-then-else statements as you want inside each other.



ison nickname v1 is on channel v2
isop nickname v1 is an op on channel v2
ishop nickname v1 is a halfop on channel v2
isvoice nickname v1 has a voice on channel v2
isreg nickname v1 is a normal nick on channel v2


/help ishop

#123678 26/06/05 06:44 PM
Joined: Jun 2005
Posts: 16
T
tyler22 Offline OP
Pikka bird
OP Offline
Pikka bird
T
Joined: Jun 2005
Posts: 16
thanks ill get to work on it


-tyler

Link Copied to Clipboard