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.
canercan
Voice
Posts: 10 Joined: Wed Jun 29, 2005 7:54 am
Post
by canercan » Wed Jun 29, 2005 8:13 am
on *:snotice:*:{
if $nick == $server {
if *clone alert* iswm $1- {
kline $+ (*@,$9) Clone Yapmayınız. 15
}
if *client connecting* iswm $1- {
fjoin $9 #chan
}
}
}
I am a novice I did it as below
bind notc - * ::ircd::notice
if $notc {
if $nick == $server {
}
if *client connecting* iswm $1- {
fjoin $9 #Sohbet
}
but it did not work can you do me a favour about converting it?
thanks
r0t3n
Owner
Posts: 507 Joined: Tue May 31, 2005 6:56 pm
Location: UK
Post
by r0t3n » Wed Jun 29, 2005 9:47 am
Well, you could try searching the TCL Archive or learning TCL. If you looked at a TCL Guide, the first thing you would notice is the binds and the proc.
That bind looks fine to me, now you need to make a proc for this.
Code: Select all
proc ::ircd::notice {nick host hand} {
if {($nick == $server)} {
blah
}
I think that will work
I dont understand what you want the other code to do, what is it looking for in $1-
r0t3n @ #r0t3n @ Quakenet
De Kus
Revered One
Posts: 1361 Joined: Sun Dec 15, 2002 11:41 am
Location: Germany
Post
by De Kus » Wed Jun 29, 2005 10:35 am
I wouldn't use double colons in proc names unless I really wanted to use
namespaces .
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under
The MIT License
Love hurts, love strengthens...
canercan
Voice
Posts: 10 Joined: Wed Jun 29, 2005 7:54 am
Post
by canercan » Wed Jun 29, 2005 11:10 am
I want to fjoin people on connect so I need help. The code I wrote at the beginning is its .mrc but tcl?
thanks
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Wed Jun 29, 2005 11:57 am
nope, you can't intercept server notices with [bind notc]
you need a raw bind:
Code: Select all
bind raw - NOTICE foo
proc foo {from keyword text} {
scan $::server {%[^:]} server
if {$from == $server} {
set who [lindex [split $text] 9] ;# or whatever parameter number it is
scan $who {%[^!]!%[^@]@%s} nick user host
if {[string match -nocase "*clone alert*" $text]} {
putserv "kline 300 *@$host :clones" ;# 300min temp kline
} elseif {[string match -nocase "*client connecting*" $text]} {
putserv "fjoin $nick #channel"
}
}
}
canercan
Voice
Posts: 10 Joined: Wed Jun 29, 2005 7:54 am
Post
by canercan » Thu Jun 30, 2005 4:18 pm
Thank you very much it does work