mIRC Home    About    Download    Register    News    Help

Print Thread
#124954 13/07/05 03:26 AM
Joined: Jan 2005
Posts: 59
C
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2005
Posts: 59
Ok well i dont know what exactly i did wrong but the only feature that works is the kick feature but it kicks me other then the nick i type so if you could please help me figure this out i would appreciate it.
Thanks
Code:
on 1:TEXT:!kick*:#: {
  if ($nick isop $chan) {
  kick $chan $nick 
}
on 1:TEXT:!ban*:#: {
  if ($nick isop $chan) {
  mode $chan +b $nick 
}
on 1:TEXT:!unban*:#: {
  if ($nick isop $chan) {
  mode $chan -b $nick
}
on 1:TEXT:!ban24*:#: {
  if ($nick isop $chan) {
  ban $chan $nick 2 Banned for $duration($duration(24 hrs)
  kick $chan $nick 
}
on 1:TEXT:!voice*:#: {
  if ($nick isop $chan) {
  mode $chan +v $nick
}
on 1:TEXT:!devoice*:#: {
  if ($nick isop $chan) {
  mode $chan -v $nick
}
on 1:TEXT:!op*:#: {
  if ($nick isop $chan) {
  mode $chan +o $nick 
}
on 1:TEXT:!deop*:#: {
  if ($nick isop $chan) {
  mode $chan -o $nick
}

#124955 13/07/05 03:38 AM
Joined: May 2005
Posts: 449
Fjord artisan
Offline
Fjord artisan
Joined: May 2005
Posts: 449
use $knick to refer to the nick you want to kick, otherwise, $nick refers to your nick.

#124956 13/07/05 04:13 AM
Joined: Jan 2005
Posts: 25
A
Ameglian cow
Offline
Ameglian cow
A
Joined: Jan 2005
Posts: 25
no no no...

i assume u wanna type sumthin like: !kick <sum-lamer-here> <kick-msg-here>

you should use $2...
as in
Code:
 
on *:text:!kick*:#:{
  if ($nick isop #) &amp;&amp; ($2 ison #) &amp;&amp; ($me isop #) {
  kick # $2 $3-
 }
}
 


in the ON TEXT event, $1- holds the whole line
in this case: !kick MyEnemy you're lame!
$1 = !kick
$2 = MyEnemy
$3- = you're lame!

get it now? smile

and to the other guy: $knick only returns sumthin on the ON KICK event, it return the nick of person who was just kicked.

edit: explained stuff

Last edited by arctangent; 13/07/05 04:18 AM.

- I AM -
#124957 13/07/05 04:27 AM
Joined: Jan 2005
Posts: 59
C
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2005
Posts: 59
i think i understand ill go mess with it some and come back tell you how it dose
Thanks

#124958 13/07/05 04:34 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Quote:
Code:
 
on *:text:!kick*:#:{
  if ($nick isop #) &amp;&amp; ($2 ison #) &amp;&amp; ($me isop #) {
  kick # $2 $3-
 }
}


Am i missing some greater purpose here? becuase if the nick making the call has op's cant they just kick the user anyway?

#124959 13/07/05 04:47 AM
Joined: Jan 2005
Posts: 25
A
Ameglian cow
Offline
Ameglian cow
A
Joined: Jan 2005
Posts: 25
lol, gez he just wants ta be flashy? grin


- I AM -
#124960 13/07/05 08:23 AM
Joined: Jan 2005
Posts: 59
C
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2005
Posts: 59
No im not trying to be flashy in any way if you would see my first post it will be doing more then kicking and sometimes i use java (i know i know but if its handy why not?) so it will be usefull and i have a op or two who dont know how to use the comands so this will help them as it dose all the work for them. Now as for the script its self i got it all worked out and im useing it like so
Code:
on *:TEXT:!ban*:#: {
  if ($nick isop #) &amp;&amp; ($2 ison #) {
   mode $chan +b $2
 }
}


and so on, Thanks again fo all the help it is appreciated smile

#124961 13/07/05 08:38 AM
Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
You also have to make sure that the bot is an OP too

Code:
on @*:TEXT:!ban*:#: {

  if ($nick isop #) &amp;&amp; ($2 ison #) {

   mode $chan +b $2

 }

}  


The "@" checks if the bot is an op then the script continues.


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
#124962 13/07/05 08:50 AM
Joined: Jan 2005
Posts: 59
C
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2005
Posts: 59
Thanks for the tip the bot will always be an op so im not to worried about it i will indeed keep that in minds now i do have one more question. Will this work for a 24hr ban

Code:
on *:TEXT:!ban24*:#: {
  if ($nick isop #) &amp;&amp; ($2 ison #) {
   ban -k $chan $2 2 Banned for $duration($duration(24 hrs)
  }
}


or should i do it this way?

Code:
on *:TEXT:!ban24*:#: {
  if ($nick isop #) &amp;&amp; ($2 ison #) {
   mode $chan +b $2 Banned for $duration($duration(24hrs)
  }
}


Thanks

#124963 13/07/05 03:26 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
First of all, you're missing ending )'s there... but that won't work anyhow.

You need to use -u to set a timed ban. /help /ban

Example:
/ban -u600 chan nick

This would ban for 600seconds (5 minutes). You use the same idea when using -k. Note that I'd just end the kick reason with "banned for 24 hours" rather than even messing with $duration... there's no reason to use $duration for this.


Invision Support
#Invision on irc.irchighway.net
#124964 13/07/05 08:59 PM
Joined: Jan 2005
Posts: 59
C
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2005
Posts: 59
ok so it would be
Code:
on *:TEXT:!ban24*:#: {
  if ($nick isop #) &amp;&amp; ($2 ison #) {
    mode $chan +b -u86400
  }
}

#124965 13/07/05 09:05 PM
Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
You should use /ban

Code:
 on @*:TEXT:!ban24*:#: {
  if ($nick isop #) &amp;&amp; ($2 ison #) {
    ban -ku86400 $chan $2 2 Your Message Here
  }
} 


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
#124966 15/07/05 12:30 AM
Joined: Jan 2005
Posts: 59
C
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2005
Posts: 59
Ok i need some more help the 24hr ban thing dosnt work for some reason and also i was wondering how i would write a line to op someone with a certin ip. Thanks again

#124967 15/07/05 05:17 AM
Joined: Jan 2005
Posts: 59
C
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2005
Posts: 59
bump

#124968 15/07/05 07:02 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
If all of the conditions of xDaeMoN's script are matched, then it will work. The conditions, in order of occurance in the script are:
A) the bot or person running the script must be opped
B) the command must be sent in the channel/room
C) the person issuing the command must be opped
C) the person named in the !ban24 command must be in the room.

As to opping someone with a certain IP, if the network has chanserv, review the information about AOP and SOP lists.
/msg chanserv help AOP
/msg chanserv help SOP

If you don't have chanserv, then you can use mIRC's AOP capabilities
/help /aop


Link Copied to Clipboard