| View previous topic :: View next topic |
| Author |
Message |
dq Voice
Joined: 03 Apr 2006 Posts: 32
|
Posted: Sun May 21, 2006 11:48 pm Post subject: Channels |
|
|
Howdy,
Anyone buck enough to traslate this into TCL?
It basically just spits out to the channel what channels the bot is currently in via .commands
| Code: | on *:TEXT:.channels:#:{
set %i 1
set %a $null
while %i <= $chan(0) {
(1%a = %a $+ $chr(32) $+ $chan(%i)
inc %i }
msg $chan Channels Idling $calc( $chan(0)) channels ; %a ¬
} |
GL and thanks in advance. |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Mon May 22, 2006 12:10 am Post subject: |
|
|
| This would fit beter in requests. This is not tcl that you asking for help with. |
|
| Back to top |
|
 |
whittinghamj Op
Joined: 21 May 2006 Posts: 103
|
Posted: Mon May 22, 2006 12:11 am Post subject: |
|
|
This should work
| Code: | bind pub - !channels pub:channels
proc pub:channels {nick host hand chan arg} {
set chans [chanlist]
notice $nick "Channels: $chans"
putcmdlog "<<$nick>> !$hand! channels"
} |
|
|
| Back to top |
|
 |
dq Voice
Joined: 03 Apr 2006 Posts: 32
|
Posted: Mon May 22, 2006 1:38 am Post subject: |
|
|
Thanks for the replys guys,
whittinghamj, I get the error
| Code: | | [01:43] Tcl error [pub:channels]: wrong # args: should be "chanlist channel ?flags?" |
Am I doing something wrong? |
|
| Back to top |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Mon May 22, 2006 1:43 am Post subject: |
|
|
the command is
not "chanlist", i have no idea how you could even confuse the two  |
|
| Back to top |
|
 |
whittinghamj Op
Joined: 21 May 2006 Posts: 103
|
Posted: Mon May 22, 2006 1:46 am Post subject: |
|
|
sorry - i been up for the past three days without sleep - its been stressful at work - server hacks
thanks for correcting me. |
|
| Back to top |
|
 |
dq Voice
Joined: 03 Apr 2006 Posts: 32
|
Posted: Mon May 22, 2006 1:49 am Post subject: |
|
|
Thanks guys,
And sorry to hear about that whittinghamj :< |
|
| Back to top |
|
 |
|