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.
WeiJie
Halfop
Posts: 73 Joined: Thu May 20, 2004 9:30 pm
Location: Singapore
Post
by WeiJie » Thu Sep 30, 2004 12:57 am
Anyone got any idea?
Alchera
Revered One
Posts: 3344 Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:
Post
by Alchera » Thu Sep 30, 2004 7:13 pm
strikelight wrote: What part of "Case Matters" don't you understand?
Everything! There's a "we don't read anything" mentality happening; a common problem.
Add [SOLVED] to the thread title if your issue has been.
Search |
FAQ |
RTM
Stealthx
Halfop
Posts: 68 Joined: Fri Oct 01, 2004 3:37 am
Location: StealthBox
Post
by Stealthx » Sat Oct 23, 2004 1:43 am
I've tried the following code by awyeah, but it doesn't work fine.
Anyone got any idea why doesn't awyeah's coding works?
+ Stealth Box +
Alchera
Revered One
Posts: 3344 Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:
Post
by Alchera » Sat Oct 23, 2004 11:52 pm
What "following" code?
Add [SOLVED] to the thread title if your issue has been.
Search |
FAQ |
RTM
Stealthx
Halfop
Posts: 68 Joined: Fri Oct 01, 2004 3:37 am
Location: StealthBox
Post
by Stealthx » Sun Oct 24, 2004 10:16 pm
The "following" code is the both coding that awyeah have scripted out:
Code: Select all
bind sign - * netsplit:lock
proc netsplit:lock {nick uhost hand chan text {reason ""}} {
global botnick netsplit_lock
set checkmode [string trim [lindex [split [getchanmode $chan]] 0] "+"]
if {(![info exists netsplit_lock]) && ([lsearch -exact $checkmode "m"] == -1) && ([string match "*.*.galaxynet.org" [lindex $reason 0]]) && ([string match "*.*.galaxynet.org" [lindex $reason 1]]) && ([llength $reason] == 2]) && ([lindex $reason 2] == "")} {
putquick "MODE $chan +m" -next; set netsplit_lock 1
putquick "NOTICE $chan :Netsplit detected, channel set to +m for 10 secs. ;)" -next
utimer 10 [list putquick "MODE $chan -m" -next]
utimer 15 [list unset netsplit_lock]
}
return 0
}
and...
Code: Select all
bind sign - * netsplit:lock
proc netsplit:lock {nick uhost hand chan text {reason ""}} {
global botnick netsplit_lock
set chan [string tolower $chan]
set checkmode [string trim [lindex [split [getchanmode $chan]] 0] "+"]
if {(![info exists netsplit_lock($chan)]) && ([lsearch -exact $checkmode "m"] == -1) && ([string match "*.*.galaxynet.org" [lindex $reason 0]]) && ([string match "*.*.galaxynet.org" [lindex $reason 1]]) && ([llength $reason] == 2]) && ([lindex $reason 2] == "")} {
putquick "MODE $chan +m" -next; set netsplit_lock($chan) 1
putquick "NOTICE $chan :Netsplit detected, channel set to +m for 10 secs. ;)" -next
utimer 10 [list putquick "MODE $chan -m" -next]
utimer 15 [list unset netsplit_lock($chan)]
}
return 0
}
+ Stealth Box +
Alchera
Revered One
Posts: 3344 Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:
Post
by Alchera » Sun Oct 24, 2004 10:39 pm
.. and you could also be a bit more elaborate on the "it doesn't work fine" bit also, not one of is a mind reader.
Add [SOLVED] to the thread title if your issue has been.
Search |
FAQ |
RTM
Stealthx
Halfop
Posts: 68 Joined: Fri Oct 01, 2004 3:37 am
Location: StealthBox
Post
by Stealthx » Mon Oct 25, 2004 7:37 am
It's like what WeiJie said,
For the code...
Code: Select all
bind sign - * netsplit:lock
proc netsplit:lock {nick uhost hand chan text {reason ""}} {
global botnick netsplit_lock
set checkmode [string trim [lindex [split [getchanmode $chan]] 0] "+"]
if {(![info exists netsplit_lock]) && ([lsearch -exact $checkmode "m"] == -1) && ([string match "*.*.galaxynet.org" [lindex $reason 0]]) && ([string match "*.*.galaxynet.org" [lindex $reason 1]]) && ([llength $reason] == 2]) && ([lindex $reason 2] == "")} {
putquick "MODE $chan +m" -next; set netsplit_lock 1
putquick "NOTICE $chan :Netsplit detected, channel set to +m for 10 secs. ;)" -next
utimer 10 [list putquick "MODE $chan -m" -next]
utimer 15 [list unset netsplit_lock]
}
return 0
}
It's shows
Tcl: syntax error in expression "(![info exists netsplit_lock]) && ([lsearch -exact $checkmod"
Tcl: ("if" test expression)
Tcl: while compiling
Tcl: "if {(![info exists netsplit_lock]) && ([lsearch -exact $checkmode "m"] == -1) && ([string match "*.*.galaxynet.org" [lindex $reason 0]]) && ([string m..."
Tcl: (compiling body of proc "netsplit:lock", line 4)
Tcl: invoked from within
Tcl: "netsplit:lock $_stnm1 $_stnm2 $_stnm3 $_stnm4 $_stnm5"
While for...
Code: Select all
bind sign - * netsplit:lock
proc netsplit:lock {nick uhost hand chan text {reason ""}} {
global botnick netsplit_lock
set chan [string tolower $chan]
set checkmode [string trim [lindex [split [getchanmode $chan]] 0] "+"]
if {(![info exists netsplit_lock($chan)]) && ([lsearch -exact $checkmode "m"] == -1) && ([string match "*.*.galaxynet.org" [lindex $reason 0]]) && ([string match "*.*.galaxynet.org" [lindex $reason 1]]) && ([llength $reason] == 2]) && ([lindex $reason 2] == "")} {
putquick "MODE $chan +m" -next; set netsplit_lock($chan) 1
putquick "NOTICE $chan :Netsplit detected, channel set to +m for 10 secs. ;)" -next
utimer 10 [list putquick "MODE $chan -m" -next]
utimer 15 [list unset netsplit_lock($chan)]
}
return 0
}
It's shows,
Tcl: syntax error in expression "(![info exists netsplit_lock($chan)]) && ([lsearch -exact $c"
Tcl: ("if" test expression)
Tcl: while compiling
Tcl: "if {(![info exists netsplit_lock($chan)]) && ([lsearch -exact $checkmode "m"] == -1) && ([string match "*.*.galaxynet.org" [lindex $reason 0]]) && ([s..."
Tcl: (compiling body of proc "netsplit:lock", line 5)
Tcl: invoked from within
Tcl: "netsplit:lock $_stnm1 $_stnm2 $_stnm3 $_stnm4 $_stnm5"
+ Stealth Box +
Alchera
Revered One
Posts: 3344 Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:
Post
by Alchera » Mon Oct 25, 2004 12:59 pm
One quick glance shows that the global variable "netsplit_lock" doesn't exist!
Add [SOLVED] to the thread title if your issue has been.
Search |
FAQ |
RTM
user
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Mon Oct 25, 2004 3:28 pm
([llength $reason] == 2])
should be
I guess
Have you ever read "The Manual"?
Stealthx
Halfop
Posts: 68 Joined: Fri Oct 01, 2004 3:37 am
Location: StealthBox
Post
by Stealthx » Tue Oct 26, 2004 12:22 am
Alchera wrote: One quick glance shows that the global variable "netsplit_lock" doesn't exist!
What should I do den?
Change the
bind sign - * netsplit:lock
to
bind sign - * netsplit_lock
?
+ Stealth Box +
metroid
Owner
Posts: 771 Joined: Wed Jun 16, 2004 2:46 am
Post
by metroid » Tue Oct 26, 2004 1:37 am
global doesnt mean proc.
Alchera
Revered One
Posts: 3344 Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:
Post
by Alchera » Tue Oct 26, 2004 3:04 am
Stealthx : Just do as user suggested.
user wrote: ([llength $reason] == 2])
should be
I guess
Add [SOLVED] to the thread title if your issue has been.
Search |
FAQ |
RTM
Stealthx
Halfop
Posts: 68 Joined: Fri Oct 01, 2004 3:37 am
Location: StealthBox
Post
by Stealthx » Tue Oct 26, 2004 4:07 am
Alchera wrote: Stealthx : Just do as user suggested.
user wrote: ([llength $reason] == 2])
should be
I guess
Changed for both code, but however, although it doesn't appear any error message now, it still doesn't work when there's a netsplit going on.
+ Stealth Box +
user
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Tue Oct 26, 2004 7:04 am
gb wrote: You might want to use bind splt and bind rejn to detect netsplit/rejoins.
See doc/tcl-commands.doc in your eggdrop dir for details.
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 » Tue Oct 26, 2004 9:07 am
Yeah, sorry I messed up in the brackets, didn't notice it as it was quite jumbled.
This should be replaced:
Code: Select all
if {(![info exists netsplit_lock]) && ([lsearch -exact $checkmode "m"] == -1) && ([string match "*.*.galaxynet.org" [lindex $reason 0]]) && ([string match "*.*.galaxynet.org" [lindex $reason 1]]) && ([llength $reason] == 2]) && ([lindex $reason 2] == "")} {
With this:
Code: Select all
if {(![info exists netsplit_lock]) && ([lsearch -exact $checkmode "m"] == -1) && ([string match -nocase "*.??.galaxynet.org" [lindex $reason 0]]) && ([string match -nocase "*.??.galaxynet.org" [lindex $reason 1]]) && ([llength $reason] == 2)} {
Using lindex $reason 2 would be almost equal if we are using llength $reason, as it is showing the length of the list, so if length is 2 its meaning appropriate, then list index 2 will obviously be null.
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================