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.

bot remove the akick and founder only allowed to add akick..

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Managed to sneak in a tiny typo. Fixed now.
NML_375
S
Sydneybabe
Op
Posts: 106
Joined: Fri Apr 27, 2007 3:31 am
Location: Philippines

Post by Sydneybabe »

hi nml375 i load the script and restart and then try it and this is appear on partyline:

<Bot> [08:46] Recieved chanserv-notice "[VERBOSE] SopUser!~usa@dal.net => akick #channel add *!*@test.com1" from "ChanServ!service@dal.net" to "@#channel"
<Bot> [08:46] Recieved chanserv-notice "SopUser has SOp access to #channel. Reason: Identification to the nickname SopUser. Channel Frozen: NO" from "ChanServ!service@dal.net" to "Bot"
<Bot> [08:46] -ChanServ (service@dal.net)- SopUser has SOp access to #channel. Reason: Identification to the nickname SopUser. Channel Frozen: NO

...the sop eggdrop Bot still doesn't remove the akick issued by the sop SopUser :/
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Had to add the banmask to the queue-list, which broke matching in "stage 2". Changed to use an array now.
NML_375
S
Sydneybabe
Op
Posts: 106
Joined: Fri Apr 27, 2007 3:31 am
Location: Philippines

Post by Sydneybabe »

hi nml375 i load the script and this is what appear on putty:

[07:59] can't unset "akick:queue": no such variable
while executing
"unset akick:queue "
(file "scripts/noakick.tcl" line 3)
invoked from within
"source scripts/noakick.tcl"
(file "eggdrop.conf" line 480)
[07:59] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Sorry, should've caught that line I suppose... updating code shorly.

Thanks for your patience sofar, somewhat limited possibilities for debugging as I don't use dalnet or chanserv-services myself.
NML_375
S
Sydneybabe
Op
Posts: 106
Joined: Fri Apr 27, 2007 3:31 am
Location: Philippines

Post by Sydneybabe »

hi nml375 i load the script and this is what appear on partyline:

<Bot> [14:56] Recieved chanserv-notice "[VERBOSE] SopUser!~usa@dalnet => akick #channel add *!*@i.am.a.1337.bsdguru.us" from "ChanServ!service@dal.net" to "@#channel"
<Bot> [14:56] Recieved chanserv-notice "SopUser has SOp access to #channel. Reason: Identification to the nickname SopUser. Channel Frozen: NO" from "ChanServ!service@dal.net" to "Bot"
<Bot> [14:56] -ChanServ (service@dal.net)- SopUser has SOp access to #channel. Reason: Identification to the nickname SopUser. Channel Frozen: NO

.. still sop Bot not deleting the akick issued by sop SopUser :/
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Posting a separate version here with some extended debugging.

Code: Select all

bind notc - {[VERBOSE]* => akick * add *} check:akick
bind notc - {* has * access to * Reason:*} check:why
catch {unset akick:queue}


proc check:akick {nick host hand text {dest ""}} {
 putlog "Recieved chanserv-notice \"$text\" from \"$nick!$host\" to \"$dest\""
 if {$dest == "" || [isbotnick $dest] || ![string equal -nocase "chanserv!service@dal.net" "$nick!$host"]} {
  putlog "Possible forged ChanServ. Ignoring..."
  return
 }
 if {[regexp -- {^\[VERBOSE\] (.+?)!(.+?) => akick (.+?) add (.+?)$} [stripcodes bcruag $text] match tnick thost tchan tmask] && ![isbotnick $tnick]} {
  putlog "Data extracted: $tnick $thost $tchan $tmask"
  set ::akick:queue([list [string tolower $tchan] [string tolower $tnick]]) $tmask
  putlog "Sending: CHANSERV WHY $tchan $tnick"
  putserv "CHANSERV WHY $tchan $tnick"
 }
}

proc check:why {nick host hand text {dest ""}} {
 putlog "Recieved chanserv-notice \"$text\" from \"$nick!$host\" to \"$dest\""
 if {![string equal -nocase "chanserv!service@dal.net" "$nick!$host"]} {
  putlog "Possible forged ChanServ. Ignoring..."
  return
 }
 if {$dest == "" || [isbotnick $dest]} {
  putlog "Origin appears authentic, continuing..."
  if {[regexp -- {^(.+?) has (SOp|AOp) access to (.+?)\. +Reason: Identification to the nickname (.+?)\. Channel Frozen: (YES|NO)$} [stripcodes bcruag $text] match tnick tacc tchan trnick tfrozen]} {
   putlog "Data extracted: $tnick $tacc $tchan $trnick $tfrozen"
   if {[info exists ::akick:queue] && [info exists ::akick:queue([list [string tolower $tchan] [string tolower $tnick]])]} {
    putlog "Sending: CHANSERV AKICK $tchan DEL [set ::akick:queue([list [string tolower $tchan] [string tolower $tnick]])]"
    putserv "CHANSERV AKICK $tchan DEL [set ::akick:queue([list [string tolower $tchan] [string tolower $tnick]])]"
    puthelp "PRIVMSG $tnick :Only Founder may add AKICK's to $tchan"
    unset ::akick:queue([list [string tolower $tchan] [string tolower $tnick]])
   } {
    putlog "Did not find scheduled check. Ignoring (Status: [info exists ::akick:queue] [info exists ::akick:queue([list [string tolower $tchan] [string tolower $tnick]])]"
   }
  }
 }
}
Edit:
Escaping literal dots (.) in the regular expression.

Edit:
Now matching multiple spaces after the channelname.
Last edited by nml375 on Fri Dec 07, 2007 1:58 pm, edited 3 times in total.
NML_375
S
Sydneybabe
Op
Posts: 106
Joined: Fri Apr 27, 2007 3:31 am
Location: Philippines

Post by Sydneybabe »

hi nml375 i load the script and this is what appear on partyline:

<Bot> [21:37] Recieved chanserv-notice "[VERBOSE] SopUser!~x@203.111.234.24 => akick #channel add *!*@test.com" from "ChanServ!service@dal.net" to "@#channel"
<Bot> [21:37] Data extracted: HackServ ~x@203.111.234.24 #channel *!*@test.com
<Bot> [21:37] Sending: CHANSERV WHY #channel SopUser
<Bot> [21:37] Recieved chanserv-notice "SopUser has SOp access to #channel. Reason: Identification to the nickname SopUser. Channel Frozen: NO" from "ChanServ!service@dal.net" to "Bot"
<Bot> [21:37] Origin appears authentic, continuing...
<Bot> [21:37] Data extracted: SopUser SOp #channel. SopUser NO
<Bot> [21:37] Did not find scheduled check. Ignoring (Status: 1 0
<Bot> [21:37] -ChanServ (service@dal.net)- SopUser has SOp access to #channel. Reason: Identification to the nickname SopUser. Channel Frozen: NO
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Unfortunately, obfuscating "HackServ" makes it somewhat hard to pin this down.
NML_375
S
Sydneybabe
Op
Posts: 106
Joined: Fri Apr 27, 2007 3:31 am
Location: Philippines

Post by Sydneybabe »

hi nml375 HackServ anyway is only a nick and no access to Dalnet Services it's just i forgot to edit that nick HackServ change to SopUser.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

That I've figured aswell..
But by obfuscating it, it makes it difficult to figure out why this check fails:

Code: Select all

if {[info exists ::akick:queue] && [info exists ::akick:queue([list [string tolower $tchan] [string tolower $tnick]])]} { 
Or, more speciffic, it seems "[list [string tolower $tchan] [string tolower [$tnick]]" yields different results in the two procs.
NML_375
S
Sydneybabe
Op
Posts: 106
Joined: Fri Apr 27, 2007 3:31 am
Location: Philippines

Post by Sydneybabe »

how to solved it nml375 i don't have idea :/
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

The debugging was added to provide the information to see what and why it does'nt match properly. Unfortunately, the data you've posted has brought no light into the matter, and actually works just fine when I simulate it on one of my own eggies (triggering each proc manually with the data you've provided).

Without better debug-data, I can only conclude "Works for me".
NML_375
S
Sydneybabe
Op
Posts: 106
Joined: Fri Apr 27, 2007 3:31 am
Location: Philippines

Post by Sydneybabe »

hi nml375 i load the script and restart the bot and this is what appear on partyline:

<Tashwini> [01:32] Recieved chanserv-notice "[VERBOSE] maLd|tang`masung|t!~grace@d193-69-36.home3.cgocable.net => akick #anthony add *!*@test.com" from "ChanServ!service@dal.net" to "@#anthony"
<Tashwini> [01:32] Data extracted: maLd|tang`masung|t ~grace@d193-69-36.home3.cgocable.net #anthony *!*@test.com
<Tashwini> [01:32] Sending: CHANSERV WHY #anthony maLd|tang`masung|t
<Tashwini> [01:32] Recieved chanserv-notice "maLd|tang`masung|t has SOp access to #anthony. Reason: Identification to the nickname maLd|tang`masung|t. Channel Frozen: NO" from "ChanServ!service@dal.net" to "Tashwini"
<Tashwini> [01:32] Origin appears authentic, continuing...
<Tashwini> [01:32] Data extracted: maLd|tang`masung|t SOp #anthony. maLd|tang`masung|t NO
<Tashwini> [01:32] Did not find scheduled check. Ignoring (Status: 1 0
<Tashwini> [01:32] -ChanServ (service@dal.net)- maLd|tang`masung|t has SOp access to #anthony. Reason: Identification to the nickname maLd|tang`masung|t. Channel Frozen: NO

..still the sop bot Tashwini not removing the akick issued by a sop user maLd|tang`masung|t :/
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Problem located, forgot to escape a . in one of the regular expressions. Updating posts shortly..
NML_375
Post Reply