FlexHub Forum

FlexHub General => Report a bug => Topic started by: Flopp on February 04, 2011, 13:22:03

Title: [Fixed] [Bug] in pattern Flexhub svn:1010
Post by: Flopp on February 04, 2011, 13:22:03
I broke it :P

Code: [Select]
[14:18:09] <FlexBot> [FI] [0] [Pattern] [VE] <ARABICA> IP: 178.150.171.175  sent a client version matching pattern: FlylinkDC++ / Message: FlylinkDC++ V r394)-beta25 / Output: Your client version matches a forbidden pattern: FlylinkDC++ V r394)-beta25 / Action: Disconnect / OK: User disconnected.
[14:18:09] <FlexBot> [FI] [-2] [ERROR] [NMDC_DataArrival] ...ads =/FlexHub)win32_x86/FlexHub/./core/Hub-Check.lua:400: attempt to concatenate local 'actionresult' (a boolean value)
SID: BUN6 IP: 178.150.171.175 <ARABICA> Data: $MyINFO $ALL ARABICA [24]<FlylinkDC++ V r394)-beta25,M ,H:26/0/0,S:25>$ $0.005 $$325737941938$

This happened after I modified a pattern like this:
Code: [Select]
!modpattern VE "FlylinkDC++" -p1 -a17to stop spamming the Feed with disconnects
Title: Re: [Bug] in pattern Flexhub svn:1010
Post by: FlipFlopâ„¢ on February 04, 2011, 13:55:43
Thanks for reporting

These are the allowed actions for !addpattern:

      [-a<actions>]      A number defining what action to take:
         0   Allow (can only be used in combination with replace)
         1   Ignore
         2   Notify user
         4   Warn user
         8   Mute user
         16   Disconnect user
         32   Kick user
         64   Ban user
         128   Redirect user (uses the redirect address from: !set rd_flood)

         One of the values above (except 0) can be combined with one or more of the following:

         256   Notify Opchat
         512   Lock Mainchat (use with caution)

Here's the catch: you can only choose one action from number 0-128, and combine it with 256 and/or 512.

I'll add a check in !addpattern / !modpattern to let the command fail if numbers between 0 and 128 are added. To prevent flooding feed, you could choose option 32 instead..