egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

bot remove the akick and founder only allowed to add akick..
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Tue Nov 20, 2007 11:18 am    Post subject: Reply with quote

Managed to sneak in a tiny typo. Fixed now.
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Sydneybabe
Op


Joined: 27 Apr 2007
Posts: 106
Location: Philippines

PostPosted: Thu Nov 22, 2007 9:52 am    Post subject: Reply with quote

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 :/
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Thu Nov 22, 2007 10:19 am    Post subject: Reply with quote

Had to add the banmask to the queue-list, which broke matching in "stage 2". Changed to use an array now.
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Sydneybabe
Op


Joined: 27 Apr 2007
Posts: 106
Location: Philippines

PostPosted: Fri Nov 23, 2007 9:03 am    Post subject: Reply with quote

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)
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Fri Nov 23, 2007 2:21 pm    Post subject: Reply with quote

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, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Sydneybabe
Op


Joined: 27 Apr 2007
Posts: 106
Location: Philippines

PostPosted: Fri Nov 23, 2007 4:03 pm    Post subject: Reply with quote

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 :/
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Fri Nov 23, 2007 4:49 pm    Post subject: Reply with quote

Posting a separate version here with some extended debugging.

Code:
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.
_________________
NML_375, idling at #eggdrop@IrcNET


Last edited by nml375 on Fri Dec 07, 2007 1:58 pm; edited 3 times in total
Back to top
View user's profile Send private message
Sydneybabe
Op


Joined: 27 Apr 2007
Posts: 106
Location: Philippines

PostPosted: Tue Nov 27, 2007 10:43 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Wed Nov 28, 2007 6:51 am    Post subject: Reply with quote

Unfortunately, obfuscating "HackServ" makes it somewhat hard to pin this down.
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Sydneybabe
Op


Joined: 27 Apr 2007
Posts: 106
Location: Philippines

PostPosted: Wed Nov 28, 2007 9:31 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Wed Nov 28, 2007 9:40 am    Post subject: Reply with quote

That I've figured aswell..
But by obfuscating it, it makes it difficult to figure out why this check fails:
Code:
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, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Sydneybabe
Op


Joined: 27 Apr 2007
Posts: 106
Location: Philippines

PostPosted: Wed Nov 28, 2007 10:36 pm    Post subject: Reply with quote

how to solved it nml375 i don't have idea :/
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Thu Nov 29, 2007 8:49 am    Post subject: Reply with quote

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, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Sydneybabe
Op


Joined: 27 Apr 2007
Posts: 106
Location: Philippines

PostPosted: Mon Dec 03, 2007 2:42 am    Post subject: Reply with quote

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 :/
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Mon Dec 03, 2007 7:22 am    Post subject: Reply with quote

Problem located, forgot to escape a . in one of the regular expressions. Updating posts shortly..
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Goto page Previous  1, 2, 3, 4  Next
Page 3 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber