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.
Old posts that have not been replied to for several years.
W
Wolf
Post
by Wolf » Tue Aug 10, 2004 3:49 pm
I was wondering if some one could help me translate this into tcl.
Code: Select all
On *:notice:*:*: if ($nick == TimXnews) && (eric isin $1-) || (*john* iswm $1-) || (*genX* iswm $1-) || (*jeff* iswm $1-) || (*fate* iswm $1-) || (*party girl* iswm $1-) { msg #wolf $1- }
trying to make that into a tcl script .
Wolf
awyeah
Revered One
Posts: 1580 Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:
Post
by awyeah » Wed Aug 11, 2004 2:06 am
Here, have a go at this!
Code: Select all
bind notc - "*" my:procedure
proc my:procedure {nick uhost hand text {chan ""}} {
if {([string equal -nocase "TimXnews" $nick]) && (([string match -nocase *eric* $nick]) || ([string match -nocase *john* $nick]) || ([string match -nocase *genx* $nick]) || ([string match -nocase *jeff* $nick]) || ([string match -nocase *fate* $nick]) || ([string match "*party*girl*" $nick]))} {
putserv "PRIVMSG #wolf :$nick"; return 0
}
}
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Wed Aug 11, 2004 10:45 am
Tip: instead of lots of string equals use regexp.
Once the game is over, the king and the pawn go back in the same box.
awyeah
Revered One
Posts: 1580 Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:
Post
by awyeah » Wed Aug 11, 2004 9:14 pm
Well, erm I am not good with regexp (complex matching) maybe someone else can help him with that.
Plus he wanted them in specific conditions and we all know that string match, is faster than regexp as well. Every micro-second counts!
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
user
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Wed Aug 11, 2004 9:39 pm
$1- == $nick && "party girl" == "party*girl"? weird stuff
Have you ever read "The Manual"?
awyeah
Revered One
Posts: 1580 Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:
Post
by awyeah » Wed Aug 11, 2004 9:43 pm
To my knowledge $1- can only be a nick, as we can see the matching types. It can only be a nick, or a channel name... nothing more! As there are no more limitations.
Still it is not defined, if the notice is sent to a channel or it is sent as a private notice to the bot!
I was never good at mIRC scripting!
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
user
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Wed Aug 11, 2004 9:48 pm
I guess he got what he deserved...for just pasting that lame mirc thing and not saying what it does
Have you ever read "The Manual"?
W
Wolf
Post
by Wolf » Fri Aug 13, 2004 5:53 pm
sorry for not explaining and the names are fake . What i was trying.. is there is a gameing channel that has a bot that displays news on the stats of the game to a channel on irc in notice format to the room, i configured a mirc script to msg a specific channel when myself, or friends names are mentioned from the bot. So basically on notice (*the bot sends the news in notice*) if nick == bot) and the names match the given names , > then message what was said and whos names was said to another given channel.
; $1- being what was said from the bot
; *party girl* being an example for me with a space in the nickname.
again sorry
nvnet admin
Wolf
awyeah
Revered One
Posts: 1580 Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:
Post
by awyeah » Sat Aug 14, 2004 12:51 am
Use this then:
Code: Select all
bind notc - "*" my:procedure
proc my:procedure {nick uhost hand text {dest ""}} {
if {(![string equal -nocase $::botnick $dest]) && ([string match "#*" $dest]) && ([string equal -nocase "timxnews" $nick]) && (([string match -nocase *eric* $text]) || ([string match -nocase *john* $text]) || ([string match -nocase *genx* $text]) || ([string match -nocase *jeff* $text]) || ([string match -nocase *fate* $text]) || ([string match "*party girl*" $text]))} {
putserv "PRIVMSG #wolf :$text"; return 0
}
}
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================