Bot Control

By mitch21236 on Aug 15, 2010

Simple Bot control snippet

simple script, i was bored.

it can have the bot talk, join, or part in channels

on *:TEXT:msg * *:?:{ msg $2 $3-
}

on *:TEXT:join *:?:{ /join $2
}

on *:TEXT:part *:?: /part $2
}

Comments

Sign in to comment.
WorldDMT   -  Aug 16, 2010

jethro_ i think u can do only $regml(1) $regml(2) $strip($$3-)

on $*:text:/\b(msg|join|part)\s(\43\S+)\b/iS:?:$regml(1) $regml(2) $strip($$3-)
 Respond  
mitch21236   -  Aug 15, 2010

sry. im a noob. i am still learning, but i can do much better than this though

 Respond  
Jethro   -  Aug 15, 2010

Oh boy every once in a while, this sort of code shows up:

on $*:text:/\b(msg|join|part)\s(\43\S+)\b/iS:?:{
  if ($istok(join part,$regml(1),32)) { 
    $regml(1) $regml(2) 
  }
  else { msg $regml(2) $strip($$3-) }
}

You gotta make sure the $2 entered starts with the chantype "#" or it can be anything else to result an error. This is best done with regex as shown per my example.

 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.