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.

Hello !join !part

Support & discussion of released scripts, and announcements of new releases.
Post Reply
User avatar
Thanhas
Op
Posts: 124
Joined: Sat Sep 02, 2006 11:14 am
Location: Ottawa, Canada

Hello !join !part

Post by Thanhas »

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
r
raider2k
Op
Posts: 140
Joined: Tue Jan 01, 2008 10:42 am

Post by raider2k »

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

Code: Select all

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
User avatar
Thanhas
Op
Posts: 124
Joined: Sat Sep 02, 2006 11:14 am
Location: Ottawa, Canada

Post by Thanhas »

yah But if you can make it a bit more advance?
User avatar
MenzAgitat
Op
Posts: 118
Joined: Tue Jul 04, 2006 12:35 pm
Location: France
Contact:

Post by MenzAgitat »

extract from Bazman`s SuPeRsCrIpT v1.0 (translated in french by me but you can easily find the original script) :

Code: Select all

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
}
User avatar
Thanhas
Op
Posts: 124
Joined: Sat Sep 02, 2006 11:14 am
Location: Ottawa, Canada

Post by Thanhas »

MenzAgitat

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

Thanks
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

Put this snipplet on your Hub bot or the bot you want to issue the commands with.

Code: Select all

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: Select all

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 :lol:
Post Reply