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.
Help for those learning Tcl or writing their own scripts.
-
blake
- Master
- Posts: 201
- Joined: Mon Feb 23, 2009 9:42 am
-
Contact:
Post
by blake »
Hey
How can I go about this I have a little code below
Code: Select all
bind pub -|- alert alert_proc
proc alert_proc { nick uhost hand chan arg } {
set text [lrange [split $arg] 0 end]
puthelp "privmsg $chan :$text"
}
I want it to trigger on Weather Alert
Code: Select all
bind pub -|- Weather Alert alert_proc
proc alert_proc { nick uhost hand chan arg } {
set text [lrange [split $arg] 0 end]
puthelp "privmsg $chan :$text"
}
If Weather Alert some txt is typed in the channel it will then message another channel
Last edited by
blake on Sun Jul 29, 2012 10:28 am, edited 1 time in total.
-
blake
- Master
- Posts: 201
- Joined: Mon Feb 23, 2009 9:42 am
-
Contact:
Post
by blake »
Code: Select all
bind pubm -|- "% weather alert*" alert_proc
proc alert_proc { nick uhost hand chan arg } {
set text [lrange [split $arg] 0 end]
puthelp "privmsg $chan :$text"
}
Okay I have the above working only problem is I dont want the Weather Alert part relayed to the channel it currently shows this
<user1> Weather Alert Flood warn issued
i just want it to relay the text after Weather Alert text is not always the same
-
SpiKe^^
- Owner
- Posts: 831
- Joined: Fri May 12, 2006 10:20 pm
- Location: Tennessee, USA
-
Contact:
Post
by SpiKe^^ »
Try This:)
Code: Select all
bind pubm -|- "% weather alert*" alert_proc
proc alert_proc { nick uhost hand chan arg } {
set text [join [lrange [split $arg] 2 end]]
puthelp "privmsg $chan :$text"
}
-
blake
- Master
- Posts: 201
- Joined: Mon Feb 23, 2009 9:42 am
-
Contact:
Post
by blake »
Excellent that has worked thank you SpiKe^^