This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

if a nick leaves the channel bot joins and leaves when back

Help for those learning Tcl or writing their own scripts.
Post Reply
t
topdawg_b
Voice
Posts: 32
Joined: Sun Dec 07, 2008 7:13 pm

if a nick leaves the channel bot joins and leaves when back

Post by topdawg_b »

i know this has been asked before and there is 1 file floating around thats suppose to do it , but #1 its a big file that does alot and #2 it doesnt work for me.

im wanting to in just a few lines of script do this.

a bot named xtreme in a channel called #games. my bot is called topbot.
i want when xtreme gets lost for topbot to enter the channel when he returns for topbot to leave #games

in mirc i used on unotify if nick == xtreme join the channel
and to leave on join if nick == xtreme part the channel

ofcourse the bind join will work for leaving but what can i do in a few line of script to get topbot to realize that xtreme left. they r not on the same channel. his covers mine if mine leaves and mine covers his if he leaves
any ideas? im just not fluent enough and i know i dont need 3 pages of code for one nick thanks
t
topdawg_b
Voice
Posts: 32
Joined: Sun Dec 07, 2008 7:13 pm

Post by topdawg_b »

well I have been reading and this is what I came up with. I am using this in reverse because I want to know when the bot leaves but I listed it here as a notify when online . to notify when offline just reverse the if else commands. I am sure the raw reply differs in servers. so you may have to change a little. This works on uicn
I hope this helps someone else. I have seen many questions. noone has really answered. if there is a better way of doing it please let me know! good luck all

Code: Select all


# set the amount of time in minutes of how often you want to check to see when nickserv is # online. Default is 1 so it will check every 1 minute to see if nickserv is online
set tim 1
# set the person in whom you are searching for.
set thenick lamenick
# set who you are
set yournick lamebot

proc ident:pr {nick user@host handle text} {
 global thenick yournick
 putserv "ISON $thenick"
}

proc ison:pr {n h paras} {
 global botnick nick pass tim thenick yournick
  if {[lindex [string tolower $paras] 1] != ":$thenick"} {
    timer $tim "ident:pr nick user@host handle text"
  } else {
   putserv "privmsg $yournick :$thenick is online now!"
  }
}

bind msg - !notify ident:pr
bind raw - 303 ison:pr
Post Reply