| View previous topic :: View next topic |
| Author |
Message |
XndR Voice
Joined: 17 Aug 2009 Posts: 3
|
Posted: Mon Aug 17, 2009 6:16 pm Post subject: mIRC script -> TCL script |
|
|
I wrote a mIRC script awhile back and am now looking to add it to an eggdrop so I don't have to be online 24/7 for the script to be active.
I have no experience with TCL scripting so I was hoping someone could just translate this real quick.
| Code: | On *:Text:*:#chan1:{
if (phrase1 isin $1-) {
if ($nick isop #chan1) {
msg #chan2 $1-
}
}
} |
Thanks. |
|
| Back to top |
|
 |
arfer Master

Joined: 26 Nov 2004 Posts: 436 Location: Manchester, UK
|
Posted: Mon Aug 17, 2009 6:20 pm Post subject: |
|
|
mIRC scripting is complete jibberish. Wouldn't it be easier simply to tell us what it does? _________________ I must have had nothing to do |
|
| Back to top |
|
 |
XndR Voice
Joined: 17 Aug 2009 Posts: 3
|
Posted: Mon Aug 17, 2009 8:15 pm Post subject: |
|
|
| It checks every line of text in chan1. If any part of it matches phrase1 and is said by an op then it will echo the text in chan2. |
|
| Back to top |
|
 |
arfer Master

Joined: 26 Nov 2004 Posts: 436 Location: Manchester, UK
|
Posted: Tue Aug 18, 2009 1:58 am Post subject: |
|
|
| Code: |
# text input channel
set vRelayChanInput "#eggtcl"
# text output channel
set vRelayChanOutput "#tcl"
# text word/phrase to match
set vRelayText "myspace"
bind PUBM - * pRelayCheckText
proc pRelayCheckText {nick uhost hand chan text} {
global vRelayChanInput vRelayChanOutput vRelayText
if {[string equal -nocase $vRelayChanInput $chan]} {
if {[string match -nocase *${vRelayText}* $text]} {
if {[isop $nick $chan]} {
if {[validchan $vRelayChanOutput]} {
if {[botonchan $vRelayChanOutput]} {
putserv "PRIVMSG $vRelayChanOutput :$nick said $text in $chan"
}
}
}
}
}
return 0
}
|
_________________ I must have had nothing to do |
|
| Back to top |
|
 |
XndR Voice
Joined: 17 Aug 2009 Posts: 3
|
Posted: Tue Aug 18, 2009 3:25 pm Post subject: |
|
|
| Thanks, it works great. Only question I have is: does eggdrop support foreign characters or no? Sometimes the string will end early if it encounters specific characters. |
|
| Back to top |
|
 |
|