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 

joinpart.tcl - make eggdrops join or part channels

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


Joined: 06 Dec 2012
Posts: 12

PostPosted: Sat Feb 09, 2013 12:15 pm    Post subject: joinpart.tcl - make eggdrops join or part channels Reply with quote

hello o/

joinpart.tcl by duarteper

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

Code:

###############################################
########
#######
######   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
Back to top
View user's profile Send private message
Madalin
Master


Joined: 24 Jun 2005
Posts: 310
Location: Constanta, Romania

PostPosted: Sat Feb 09, 2013 12:27 pm    Post subject: Reply with quote

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
_________________
https://github.com/MadaliNTCL - To chat with me: https://tawk.to/MadaliNTCL
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
duarteper
Voice


Joined: 06 Dec 2012
Posts: 12

PostPosted: Sat Feb 09, 2013 12:36 pm    Post subject: Reply with quote

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


Joined: 24 Jun 2005
Posts: 310
Location: Constanta, Romania

PostPosted: Sat Feb 09, 2013 12:45 pm    Post subject: Reply with quote

Yes it works but you need the

Quote:
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]
_________________
https://github.com/MadaliNTCL - To chat with me: https://tawk.to/MadaliNTCL
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
dirty
Halfop


Joined: 08 Feb 2013
Posts: 40
Location: Romania

PostPosted: Sat Feb 09, 2013 12:50 pm    Post subject: Reply with quote

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


Joined: 06 Dec 2012
Posts: 12

PostPosted: Sat Feb 09, 2013 1:01 pm    Post subject: Reply with quote

i change this

Code:
bind pub n|n !wjoin41 pub:join
bind pub n|n !wpart41 pub:part


to this

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


is that the insue?
Back to top
View user's profile Send private message
Madalin
Master


Joined: 24 Jun 2005
Posts: 310
Location: Constanta, Romania

PostPosted: Sat Feb 09, 2013 1:20 pm    Post subject: Reply with quote

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
_________________
https://github.com/MadaliNTCL - To chat with me: https://tawk.to/MadaliNTCL
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
duarteper
Voice


Joined: 06 Dec 2012
Posts: 12

PostPosted: Sun Feb 10, 2013 9:16 pm    Post subject: Reply with quote

With Madalin help, code edited on fisrt post
thanks Madalin
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 -> 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