leave snippet

By Null on Dec 26, 2006

The leave command seems to be growing in popularity with bot owners so i have decided to write this up quick.

Instructions: To trigger the script use 1 of the following triggers !@`. followed by leave for Example !leave (Note: you must be oped in the channel to use this command)

Output is as follows:

[YourbotsNick] has left #Channel (Command used by NullNet from #Channel at 18:11:16)

#######################################
# Leave Script                        #
# Author: NullNet                     #
# Website: Http://www.mIRC.ms         #
# Notes: To load this script simply   #
# paste in to remotes                 #
#######################################
on $*:text:/^[!@`.]leave/Si:*: { 
  if ($nick isop $chan) {
  /part $chan Command used by $nick from $chan at $time }
}

Comments

Sign in to comment.
Pass   -  May 06, 2007

Notorious, you do not need a semi-colon before every commented line. Although it works, the help file actually specifies \"#\" as its a commenting character for single lines.

 Respond  
Lindrian   -  Dec 26, 2006

kay sorry, I didnt look very well ;)

 Respond  
Null   -  Dec 26, 2006

Note i did not use if ($me isop $chan) and yes you could just do that but if ($nick isop $chan) is in there so people with little knowledge can easily recognise how to add other access levels such as halfops etc to the script

 Respond  
Lindrian   -  Dec 26, 2006

the / is not neccesary at all.

And correct me if im wrong, but arent you able to just to do this;
on $@:text:/^[!@`.]leave/Si:*: {

instead of using if ($me isop $chan)

?
Correct me if im wrong.

 Respond  
Null   -  Dec 26, 2006

Didnt spot the bracket thanks

 Respond  
Noutrious   -  Dec 26, 2006

Missed one bracket at the script end + add ; at start of any comments, else you will damage the snippet.

 Respond  
Null   -  Dec 26, 2006

Yes but alot of bot owners especially on the swiftirc network like having a !leave command on there bots to allow operators of channels using the bot to simple type !leave to make the bot exit the channel.

An example of the reason for use would be if your bot auto rejoined channels it was kicked from it saves chan operators using the bot in their channel then deciding they dont want it anymore or at that particular time then kicking it only having it rejoining their channel then having to kb

 Respond  
Lindrian   -  Dec 26, 2006

I do think, there\'s already a /part alias in mirc. and aswell with the message. Atleast I am able to type /part #chan with my regular mirc.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.