egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

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

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
topdawg_b
Voice


Joined: 07 Dec 2008
Posts: 32

PostPosted: Sat Dec 13, 2008 3:13 pm    Post subject: if a nick leaves the channel bot joins and leaves when back Reply with quote

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
Back to top
View user's profile Send private message
topdawg_b
Voice


Joined: 07 Dec 2008
Posts: 32

PostPosted: Sun Dec 14, 2008 12:49 pm    Post subject: Reply with quote

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:


# 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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber