auto join script for bots

By A_A on Aug 18, 2007

this is a nice auto join script for bots, all you have to do is type ?auto add|del|list #channel to add delete or list channels set for the bot to auto join when it connects, make sure to replace A_A with your own nick though, wont even need to go into the bot's mirc to edit the startup channels =)

on *:TEXT:?auto*:#: {
  if ($nick == A_A) {  
    if ($2 == add) {
      if ($istok(%auto.channels,$3,44)) {
        msg $nick Channel already exists.
      }
      else {
        set %auto.channels $addtok(%auto.channels,$3,44)
        msg $nick Added $3 to my auto-join list.
        join $3
      }
    }
    elseif ($2 == list) {
      msg $nick Current channels on auto-join: $replace(%auto.channels,$chr(44),$chr(32))
    }
    elseif ($2 == del) {
      if ($istok(%auto.channels,$3,44)) {
        set %auto.channels $remtok(%auto.channels,$3,44)
        msg $nick Removed $3 from my auto-join list.
        part $3 Removed by $nick
      }
      else {
        msg $nick Channel doesn't exist.
      }
    }
  }
}
on *:connect: { join %auto.channels }

Comments

Sign in to comment.
zainul   -  Feb 05, 2011

top script

 Respond  
guest598594   -  Aug 22, 2007

im confused...why did you add tokens with a delimeter of 44 (,) yet when you go to list, you replace it with 32 ( ) why not just addtok with 32 in the first place? :?

 Respond  
A_A   -  Aug 18, 2007

true but i am lazy =) id rather just type it in to add or remove the channels rather then going into the bots favourites

 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.