| View previous topic :: View next topic |
| Author |
Message |
duarteper Voice
Joined: 06 Dec 2012 Posts: 12
|
Posted: Sat Feb 09, 2013 12:15 pm Post subject: joinpart.tcl - make eggdrops join or part channels |
|
|
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 |
|
 |
Madalin Master

Joined: 24 Jun 2005 Posts: 310 Location: Constanta, Romania
|
Posted: Sat Feb 09, 2013 12:27 pm Post subject: |
|
|
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 |
|
 |
duarteper Voice
Joined: 06 Dec 2012 Posts: 12
|
Posted: Sat Feb 09, 2013 12:36 pm Post subject: |
|
|
| 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 |
|
 |
Madalin Master

Joined: 24 Jun 2005 Posts: 310 Location: Constanta, Romania
|
Posted: Sat Feb 09, 2013 12:45 pm Post subject: |
|
|
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 |
|
 |
dirty Halfop
Joined: 08 Feb 2013 Posts: 40 Location: Romania
|
Posted: Sat Feb 09, 2013 12:50 pm Post subject: |
|
|
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 |
|
 |
duarteper Voice
Joined: 06 Dec 2012 Posts: 12
|
Posted: Sat Feb 09, 2013 1:01 pm Post subject: |
|
|
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 |
|
 |
Madalin Master

Joined: 24 Jun 2005 Posts: 310 Location: Constanta, Romania
|
Posted: Sat Feb 09, 2013 1:20 pm Post subject: |
|
|
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 |
|
 |
duarteper Voice
Joined: 06 Dec 2012 Posts: 12
|
Posted: Sun Feb 10, 2013 9:16 pm Post subject: |
|
|
With Madalin help, code edited on fisrt post
thanks Madalin |
|
| Back to top |
|
 |
|