Channel Greet System For A Bot

Platform:  mIRC
Published  Jun 18, 2011
Updated  Jun 18, 2011
Simple Channel greet system for a bot. Add to a new remotes file then just do !setgreet greethere and everytime you enter the channel you set it on it will greet you with your preset greet. You can reset your greet as well with the !resetgreet command. And check it with !checkgreet. on !*:join:#: {
if ($readini(greet.ini,$chan,$nick)) {
.msg $chan $readini(greet.ini,$chan,$nick)
}
}
on $*:TEXT:/^(!setgreet)/Si:#:{
if ($readini(greet.ini, $chan,$nick)) {
.notice $nick your greet is already set as $readini(greet.ini,$chan ,$nick,4) to change it do !resetgreet first
}
else { writeini greet.ini $chan $nick $2-
}
}
on $*:TEXT:/^(!resetgreet)/Si:#:{
remini greet.ini $chan $nick
}
on $*:TEXT:/^(!checkgreet)/Si:#:{
if (!$readini(greet.ini, $chan,$nick)) {
msg $chan $nick you do not have a greet set up for this channel type !setgreet yourgreet to set a greet
}
else { if ($readini(greet.ini,$chan,$nick)) {
msg $chan $nick your greet is set as $readini(greet.ini,$chan,$nick)
}
}
}

Comments

Sign in to comment.
blackvenomm666   -  Jun 18, 2011
ooo i'll take a look into it:) ty
 Respond  
Jethro   -  Jun 18, 2011
Code
 
mIRC will then load your INI file's item and value within that section to the hash table you make called test.
 Respond  
Jethro   -  Jun 18, 2011
INI works very similar to hash table, except for the fact that a hash table needs to be saved to retain the info stored upon closing or exiting. If you already know how INI works, it should be a piece of cake for you when it comes to hash table. Incidentally, hash table has an internal command hload and the -i switch you can import INI file item and data to hash table with ease.
 Respond  
blackvenomm666   -  Jun 18, 2011
nicely done jeth. i still need to learn hash tables though haha:).
 Respond  
Jethro   -  Jun 18, 2011
My hash table version if interested:
Code
 
 Respond  
Aha2Y   -  Jun 18, 2011
Meh, nice. :)
 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.