| View previous topic :: View next topic |
| Author |
Message |
Kemikals Voice
Joined: 12 Mar 2009 Posts: 4
|
Posted: Thu Mar 12, 2009 9:54 am Post subject: Very simple script |
|
|
I have no clue how to write this i know it's a very simple script though.
All i need it to do is if i type a command like !release (text here) it will make the eggdrop take whatever text after !release and display it in another channel of my choosing. |
|
| Back to top |
|
 |
tomekk Master

Joined: 28 Nov 2008 Posts: 255 Location: Oswiecim / Poland
|
Posted: Thu Mar 12, 2009 11:17 am Post subject: |
|
|
| Code: | # !release cmd channels
set bcast_cmd_chans {#channel1 #channel2}
# target channel
set bcast_chan "#channel"
#############################################
bind pub -|- !release do_bcast
proc do_bcast { nick uhost hand chan arg } {
global bcast_chan bcast_cmd_chans
if {[lsearch $bcast_cmd_chans $chan] == -1} {
return
}
if {[botonchan $bcast_chan]} {
putserv "PRIVMSG $bcast_chan :$arg"
}
}
putlog "release.tcl loaded"
|
test it |
|
| Back to top |
|
 |
Kemikals Voice
Joined: 12 Mar 2009 Posts: 4
|
Posted: Thu Mar 12, 2009 2:25 pm Post subject: |
|
|
you my sir are my hero works like a charm!!! |
|
| Back to top |
|
 |
Kemikals Voice
Joined: 12 Mar 2009 Posts: 4
|
Posted: Thu Mar 12, 2009 5:05 pm Post subject: |
|
|
thanks
Last edited by Kemikals on Thu Mar 12, 2009 5:33 pm; edited 1 time in total |
|
| Back to top |
|
 |
tomekk Master

Joined: 28 Nov 2008 Posts: 255 Location: Oswiecim / Poland
|
Posted: Thu Mar 12, 2009 5:26 pm Post subject: |
|
|
try:
| Code: | namespace eval newp {
variable bcast_cmd_chans
variable bcast_chan
# !new cmd channels
set bcast_cmd_chans {#chan #chan2}
# target channel
set bcast_chan "#chan"
#############################################
bind pub -|- !new [namespace current]::do_bcast
proc ::newp::do_bcast { nick uhost hand chan arg } {
variable bcast_cmd_chans
variable bcast_chan
if {[lsearch $bcast_cmd_chans $chan] == -1} {
return
}
if {[botonchan $bcast_chan]} {
putserv "PRIVMSG $bcast_chan :$arg"
}
}
putlog "release.tcl loaded"
}
|
2nd:
| Code: | namespace eval upp {
variable bcast_cmd_chans
variable bcast_chan
# !up cmd channels
set bcast_cmd_chans {#chan #chan2}
# target channel
set bcast_chan "#chan"
#############################################
bind pub -|- !up [namespace current]::do_bcast
proc ::upp::do_bcast { nick uhost hand chan arg } {
variable bcast_cmd_chans
variable bcast_chan
if {[lsearch $bcast_cmd_chans $chan] == -1} {
return
}
if {[botonchan $bcast_chan]} {
putserv "PRIVMSG $bcast_chan :$arg"
}
}
putlog "release.tcl loaded"
}
|
anyway, this should be all in one script
and btw. don't tell me that script is for some warez?
Last edited by tomekk on Thu Mar 12, 2009 5:58 pm; edited 3 times in total |
|
| Back to top |
|
 |
Kemikals Voice
Joined: 12 Mar 2009 Posts: 4
|
Posted: Thu Mar 12, 2009 5:33 pm Post subject: |
|
|
Thanks and no |
|
| Back to top |
|
 |
|