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.

on notice script help

Old posts that have not been replied to for several years.
Locked
W
Wolf

on notice script help

Post by Wolf »

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
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Here, have a go at this! :mrgreen:

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.
==================================
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

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.
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Well, erm I am not good with regexp (complex matching) maybe someone else can help him with that. :mrgreen:

Plus he wanted them in specific conditions and we all know that string match, is faster than regexp as well. Every micro-second counts! :wink:
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

i don't know that mirc stuff, but...

Post by user »

$1- == $nick && "party girl" == "party*girl"? weird stuff :P
Have you ever read "The Manual"?
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

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. :P

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! :roll:
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

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 »

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
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

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.
==================================
Locked