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.

joinpart.tcl - make eggdrops join or part channels

Support & discussion of released scripts, and announcements of new releases.
Post Reply
d
duarteper
Voice
Posts: 12
Joined: Thu Dec 06, 2012 10:55 pm

joinpart.tcl - make eggdrops join or part channels

Post by duarteper »

hello o/

joinpart.tcl by duarteper

Type in channel :
!join #CHANNEL
!part #CHANNEL

Code: Select all

###############################################
########
#######
######   join us pt.PTchat.org
#####     add joinpart.tcl to eggrop .conf file
####       !Join #Channel
###         !Part #Channel
##
#

bind pub n|n !join pub:join 
bind pub n|n !part pub:part 

### BOTNET begin 
bind BOT - bjoin bjoin 
bind BOT - bpart bpart 

proc bjoin {from key arg} { 

   if {![validchan [lindex [split $arg] 0]]} { 
      channel add [lindex [split $arg] 0] 
   } 
} 

proc bpart {from key arg} { 

   if {[validchan [lindex [split $arg] 0]]} { 
      channel remove [lindex [split $arg] 0] 
   } 
} 

### botnet end 

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 
   } 
}

putlog "JoinPartChan by duarteper - Loaded!" 

i hope this helps you [[]]
Last edited by duarteper on Sun Feb 10, 2013 9:17 pm, edited 4 times in total.
User avatar
Madalin
Master
Posts: 310
Joined: Fri Jun 24, 2005 11:36 am
Location: Constanta, Romania
Contact:

Post by Madalin »

The script is incomplet ... it doesnt have the part where the other linkedk bots receive the JOIN/PART command. So please copy-paste the entire script if you want this be public
d
duarteper
Voice
Posts: 12
Joined: Thu Dec 06, 2012 10:55 pm

Post by duarteper »

Madalin wrote:The script is incomplet ... it doesnt have the part where the other linkedk bots receive the JOIN/PART command. So please copy-paste the entire script if you want this be public
sorry this script is working on my eggdrops
User avatar
Madalin
Master
Posts: 310
Joined: Fri Jun 24, 2005 11:36 am
Location: Constanta, Romania
Contact:

Post by Madalin »

Yes it works but you need the
bind BOT - command proc
For the bjoin/bpart BOT commands. So what you copy-paste is incomplete and it will work for you but not for anyone else[/code]
d
dirty
Halfop
Posts: 40
Joined: Fri Feb 08, 2013 2:33 pm
Location: Romania
Contact:

Post by dirty »

What Madalin is trying to say is that you need to paste the tcl that you have in the "leaf" bot as well because it won`t work otherwise. The script is complete but you need to paste the other one as well.
come to the dark side.. I have cookies!
WwW.BotZone.TK
d
duarteper
Voice
Posts: 12
Joined: Thu Dec 06, 2012 10:55 pm

Post by duarteper »

i change this

Code: Select all

bind pub n|n !wjoin41 pub:join 
bind pub n|n !wpart41 pub:part 
to this

Code: Select all

bind pub n|n !join pub:join 
bind pub n|n !join pub:part 
is that the insue?
User avatar
Madalin
Master
Posts: 310
Joined: Fri Jun 24, 2005 11:36 am
Location: Constanta, Romania
Contact:

Post by Madalin »

No the script as i said is incomplet. An important part (the botnet part) is missing. So the script will only work with the current bot but the botnet part will not work.
This means the bot with the script will join/part but the others (on the botnet if others are linked) they wont interract

That botnet part can be in another .tcl file or in the same tcl as the !join/part command
d
duarteper
Voice
Posts: 12
Joined: Thu Dec 06, 2012 10:55 pm

Post by duarteper »

With Madalin help, code edited on fisrt post
thanks Madalin
Post Reply