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 

Hello !join !part

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
Thanhas
Op


Joined: 02 Sep 2006
Posts: 124
Location: Ottawa, Canada

PostPosted: Fri Aug 14, 2009 7:20 am    Post subject: Hello !join !part Reply with quote

Hllo iam been tired alot to search after i am failed i am here to ask you guys help me please

i need a TCl which works for me:

When i am in Channel #xyz and i have there 4 Eggdrops there so by one command of me !join #zzzz all 4 shuold join there.
and so own for Part !part #zzz and all do part

it shuold work only for Owner and if possile put !say nick hello or !notice nick Hello

Thank you
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
raider2k
Op


Joined: 01 Jan 2008
Posts: 140

PostPosted: Fri Aug 14, 2009 7:25 am    Post subject: Reply with quote

just a rough scratch as I dont have much time at the moment:

Code:

proc addchannel { from cmd text } {
   set text [split $text]
   set chan [lindex $text 0]
   channel add $chan
}

proc remchannel { from cmd text } {
   set text [split $text]
   set chan [lindex $text 0]
   channel remove $chan
}


try to build something around it.

//edit:

{ from cmd text } is for bind bot
use
{ nick uhost handle chan text }
for bind pub to make eggdrops get info from channels
Back to top
View user's profile Send private message
Thanhas
Op


Joined: 02 Sep 2006
Posts: 124
Location: Ottawa, Canada

PostPosted: Fri Aug 14, 2009 12:18 pm    Post subject: Reply with quote

yah But if you can make it a bit more advance?
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
MenzAgitat
Op


Joined: 04 Jul 2006
Posts: 118
Location: France

PostPosted: Fri Aug 14, 2009 1:46 pm    Post subject: Reply with quote

extract from Bazman`s SuPeRsCrIpT v1.0 (translated in french by me but you can easily find the original script) :
Code:
bind pub n|n !join pub_do_join

proc pub_do_join {nick host handle channel testes} {
  set who [lindex $testes 0]
  if {$who == ""} {
    putserv "NOTICE $nick :Syntaxe : !join <#channel>"
    return 1
  }
  if {[validchan $who]} {
    putserv "NOTICE $nick : Je suis déjà sur $who."
    return 1
  }
  channel add $who
  set owna [nick2hand $nick $channel]
  putserv "NOTICE $nick :Nouveau chan ajouté : $who."
  putserv "PRIVMSG $who :Coucou ! $who a été ajouté à ma liste de chans par $nick."
  chattr $owna |+amno $who
  return 1
}

bind pub n|n !part pub_do_part

proc pub_do_part {nick host handle channel testes} {
  if {$testes == ""} {
    putserv "NOTICE $nick :Syntaxe : !part <#channel>"
    return 1
  }
  putserv "PRIVMSG $channel :$testes a été supprimé de ma liste de chans par $nick."
  putserv "NOTICE $nick :$testes a été supprimé de ma liste de chans."
  channel remove $testes
}
Back to top
View user's profile Send private message Visit poster's website
Thanhas
Op


Joined: 02 Sep 2006
Posts: 124
Location: Ottawa, Canada

PostPosted: Fri Aug 14, 2009 2:15 pm    Post subject: Reply with quote

MenzAgitat

Thanks but its not working and please pt !notice nick also please
i try this on my channel it dosnt work

Thanks
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Fri Aug 14, 2009 3:46 pm    Post subject: Reply with quote

Put this snipplet on your Hub bot or the bot you want to issue the commands with.
Code:
bind pub n|- !join pub:join
bind pub n|- !part pub:part
bind pub n|- !notice pub:notice
bind pub n|- !say pub:say

proc pub:join {nick host hand chan text} {
 set newchan [lindex [split $text] 0]
 if {$newchan == ""} {
  puthelp "NOTICE $nick :No Channel Given."
  return 0
 }
 putallbots "bjoin $newchan"
 if {![validchan "$newchan"]} {
  channel add $newchan
  return 1
 } else {
  puthelp "NOTICE $nick :I'm already on that channel"
  return 0
 }
}

proc pub:part {nick host hand chan text} {
 set oldchan [lindex [split $text] 0]
 if {$oldchan == ""} {
  puthelp "NOTICE $nick :Please give a channel name."
  return 0
 }
 putallbots "bpart $oldchan"
 if {[validchan "$oldchan"]} {
  channel remove $oldchan
  return 1
 } else {
  puthelp "NOTICE $nick :I'm not on \002$oldchan\002"
  return 0
 }
}

proc pub:notice {nick host hand chan text} {
 set dest [lindex [split $text] 0]
 set notc [join [lrange [split $text] 1 end]]
 if {$dest == ""} {
  puthelp "NOTICE $nick :No Target Given: will use this channel!"
  set dest "$chan"
 }
 if {$notc == ""} {
  puthelp "NOTICE $nick :No text given."
  return 0
 }
 putallbots "bnotice $dest $notc"
 puthelp "NOTICE $dest :$notc"
 return 1
}

proc pub:say {nick host hand chan text} {
 set dest [lindex [split $text] 0]
 set msg [join [lrange [split $text] 1 end]]
 if {$dest == ""} {
  puthelp "NOTICE $nick :No Target Given: will use this channel"
  set dest "$chan"
 }
 if {$msg == ""} {
  puthelp "NOTICE $nick :No Text given"
  return 0
 }
 putallbots "bsay $dest $msg"
 puthelp "PRIVMSG $dest :$msg"
 return 1
}
And Place this snipplet on all the other bots
Code:
bind bot - bjoin bot:bjoin
bind bot - bpart bot:bpart
bind bot - bnotice bot:bnotice
bind bot - bsay bot:bsay

proc bot:bjoin {from command text} {
 set newchan [lindex [split $text] 1]
 if {![validchan "$newchan"]} {
  channel add $newchan
  return
 }
}

proc bot:bpart {from command text} {
 set oldchan [lindex [split $text] 1]
 if {[validchan "$oldchan"]} {
  channel remove $oldchan
  return
 }
}

proc bot:bnotice {from command text} {
 set dest [lindex [split $text] 1]
 set notc [join [lrange [split $text] 2 end]]
 puthelp "NOTICE $dest :$notc"
 return
}

proc bot:bsay {from command text} {
 set dest [lindex [split $text] 1]
 set msg [join [lrange [split $text] 2 end]]
 puthelp "PRIVMSG $dest :$msg"
 return
}
simpulz yes Laughing
_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases 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