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.

adding new channel

Old posts that have not been replied to for several years.
Locked
j
jammer1
Voice
Posts: 39
Joined: Tue Feb 11, 2003 11:40 am

adding new channel

Post by jammer1 »

how do i add a new channel to this procedure.

:D
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

what procedure ?

if u mean the eggdrop, then see .help +chan
j
jammer1
Voice
Posts: 39
Joined: Tue Feb 11, 2003 11:40 am

Post by jammer1 »

sorry I iadded the procedure but for some reason it didn't take.
:cry:

#################################################
# bind bot - mode do_bot_mode
#################################################
# other nets don't know my chans so they give me
# Chanid
# incoming no need for duty comp
proc do_bot_mode { nick command testes } {
global tempchan opschan goodchan mainchan
set chanID [lindex $testes 0]
set who [lindex $testes 1]
set host [lindex $testes 2]
set rest [lrange $testes 3 end]
if {$chanID == "T" } { set cchan $tempchan
} elseif {$chanID == "G" } { set cchan $goodchan
} elseif {$chanID == "O" } { set cchan $opschan
} elseif {$chanID == "M" } { set cchan $mainchan
} else {
putlog "bad ID sent to do_bot_mode $chanID"
return 0
}
set lamahs [chanlist $mainchan]
foreach lamah $lamahs {
if {[maskhost [getchanhost $lamah $mainchan ]] == $host} {
putserv "MODE $cchan $rest $lamah "
broadcast_ops "14æ set mode $rest for $lamah on $cchan"
return 0
}
}
}
#####>>>>> END bind bot - mode do_bot_mode
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

To add a channel within TCL do something like: channel add #channel .. You should consult the tcl-commands.doc file first then ask questions. :)
Once the game is over, the king and the pawn go back in the same box.
j
jammer1
Voice
Posts: 39
Joined: Tue Feb 11, 2003 11:40 am

Post by jammer1 »

yeah, but i'm asking how to add a channel to this procedure, thats not in the that file, went there first before I ask the question. I'm not familiar with the chanid in the procedure. I need to know how to find the character like the one in this statement if {$chanID == "T" } { set cchan $tempchan
:D
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Huh? The chanid thing from this code is the first argument from the line that comes with the command when the proc is triggered. What exactly do you want to do/change there?
Once the game is over, the king and the pawn go back in the same box.
j
jammer1
Voice
Posts: 39
Joined: Tue Feb 11, 2003 11:40 am

Post by jammer1 »

Well i added a new channel in irc and i need to get it in the procedure.
problem is I don't know how to add it to the procedure. This statement says } elseif {$chanID == "M" } { set cchan $mainchan
I can just add the same statement as } elseif {$chanID == "?" } { set cchan $newchan, but i don't know what the value "?" is.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

read at the end of the tcl-commands.doc to learn about the "MATCH CHARACTERS"
j
jammer1
Voice
Posts: 39
Joined: Tue Feb 11, 2003 11:40 am

Post by jammer1 »

Geez guys, I have read the tcl.doc.

What I'm looking for is how do I get the value thats for the new channel?

if {$chanID == "T" } { set cchan $tempchan
} elseif {$chanID == "G" } { set cchan $goodchan
} elseif {$chanID == "O" } { set cchan $opschan
} elseif {$chanID == "M" } { set cchan $mainchan
} else {
putlog "bad ID sent to do_bot_mode $chanID"
return 0
}
This procedure statement $chanID == "T" the "T" is my temp channel
$chanID == "G" the "G" is my good channel
$chanID == "O" the "O" is my ops channel
$chanID == "M" the "M" is my main channel

How do I find the value for the new channel I created on the irc?
This procedure directs my bots to do different functions on these channels.
it actually tells the bots where to go to do the function.
Locked