Menu

#39 SpamServ V 1.08

open
nobody
None
5
2024-04-21
2004-02-27
feigling
No

This is version 1.01.
I found a small bug in version 1.0, which could crash
srvx, when a user joined a channel, said something,
joined a second channel and parted the channel without
saying anything in the channel.
This bug is fixed.

SpamServ can detect spam, flood, joinflood and
unallowed advertisements.
Advertisements are: www. http: ftp. ftp: and #.
SpamServ allows you to set various channel settings, for
example, you can enable/disable any check (spam,
flood, ..), you can modify the punishment and you can
decide, whether SpamServ has to scan messages from
channel ops or voiced users.

When you suspend/unsuspend ChanServ, SpamServ
parts/joins the channel as well.
When you unregister/move/merge a Channel, SpamServ
parts the channel.
When a channel loses all users or expires, SpamServ
parts the channel.
In all cases, the channel has to be registered with
SpamServ ;)

When a user gets killed and reconnects to the network
within an hour, SpamServ notices that and will gline the
user, when he violates the rules again.

It is possible to add special exceptions to every channel.
If you want to allow users to post a special
channelname or an url, e.g. you want to
allow "#support" you can do "/msg

Spamserv addexception #your_channel #support". That
means, SpamServ will not punish a user when he posts
the channelname #support.

Other example: "/msg spamserv addexception
#your_channel gamesurge.net" means, a user can
post "www.gamesurge.net/aup/".

---

Installation:

1. Download srvx-1.2.1 at
http://prdownloads.sourceforge.net/srvx/srvx-
1.2.1.tar.gz?download

2. Unpack srvx and put the patch into the directory,
which contains the srvx-1.2.1 directory. Do NOT copy
the patch into the srvx directory !

3. To patch srvx, simply type "patch -p0 <
spamserv.patch" or "patch -p1 < spamserv.patch" in the
directory, which contains the srvx directory and the
patch file.

4. Type "./configure" , "make" and "make install".

5. Change the srvx.conf.example and execute srvx.

6. Do "/msg opserv bind spamserv * *spamserv.*" to
bind all commands.

Btw, this patch will NOT delete an existing srvx.db, so
don't worry, you won't lose your data, but it's better to
create a backup.

---

Memory Information:

I made some "statistics" about the memory usage and I
can promise, SpamServ doesn't need much memory.

To see the memory usage, you can do "/msg spamserv
status".

Some examples:

One user, who is not in any channel + one channel
registered

-SpamServ- Status:
-SpamServ- Total Users Online: 1
-SpamServ- Registered Channels: 1
-SpamServ- Memory Information:
-SpamServ- Channel Memory Usage: 20 Byte; 0.0195312
KiloByte; 1.90735e-05 MegaByte
-SpamServ- User Memory Usage : 28 Byte; 0.0273438
KiloByte; 2.67029e-05 MegaByte
-SpamServ- Total Memory Usage : 48 Byte; 0.046875
KiloByte; 4.57764e-05 MegaByte

---------------------

One user, who is in one channel + spammed in the
channel + one channel registered

-SpamServ- Status:
-SpamServ- Total Users Online: 1
-SpamServ- Registered Channels: 1
-SpamServ- Memory Information:
-SpamServ- Channel Memory Usage: 20 Byte; 0.0195312
KiloByte; 1.90735e-05 MegaByte
-SpamServ- User Memory Usage : 96 Byte; 0.09375
KiloByte; 9.15527e-05 MegaByte
-SpamServ- Total Memory Usage : 116 Byte; 0.113281
KiloByte; 0.000110626 MegaByte

---------------------

One user, who is not in any channel + one channel
registered + exception "1234567890" (10 bytes for this
exception -> length(string) = number of bytes)

-SpamServ- Status:
-SpamServ- Total Users Online: 1
-SpamServ- Registered Channels: 1
-SpamServ- Memory Information:
-SpamServ- Channel Memory Usage: 30 Byte; 0.0292969
KiloByte; 2.86102e-05 MegaByte
-SpamServ- User Memory Usage : 28 Byte; 0.0273438
KiloByte; 2.67029e-05 MegaByte
-SpamServ- Total Memory Usage : 58 Byte; 0.0566406
KiloByte; 5.53131e-05 MegaByte

---------------------

500 users, who are not in any channel + one channel
registered

-SpamServ- Status:
-SpamServ- Total Users Online: 501
-SpamServ- Registered Channels: 1
-SpamServ- Memory Information:
-SpamServ- Channel Memory Usage: 30 Byte; 0.0292969
KiloByte; 2.86102e-05 MegaByte
-SpamServ- User Memory Usage : 14028 Byte; 13.6992
KiloByte; 0.0133781 MegaByte
-SpamServ- Total Memory Usage : 14058 Byte; 13.7285
KiloByte; 0.0134068 MegaByte

---------------------

500 users, who are in one channel + spammed in the
channel + one channel registered

-SpamServ- Status:
-SpamServ- Total Users Online: 501
-SpamServ- Registered Channels: 1
-SpamServ- Memory Information:
-SpamServ- Channel Memory Usage: 30 Byte; 0.0292969
KiloByte; 2.86102e-05 MegaByte
-SpamServ- User Memory Usage : 36072 Byte; 35.2266
KiloByte; 0.0344009 MegaByte
-SpamServ- Total Memory Usage : 36102 Byte; 35.2559
KiloByte; 0.0344296 MegaByte

---------------------

10000 users, who aren't in any channel + one channel
registered

-SpamServ- Status:
-SpamServ- Total Users Online: 10001
-SpamServ- Registered Channels: 1
-SpamServ- Memory Information:
-SpamServ- Channel Memory Usage: 30 Byte; 0.0292969
KiloByte; 2.86102e-05 MegaByte
-SpamServ- User Memory Usage : 280028 Byte; 273.465
KiloByte; 0.267056 MegaByte
-SpamServ- Total Memory Usage : 280058 Byte;
273.494 KiloByte; 0.267084 MegaByte

-> 28 Byte/User

---------------------

10000 users, who are in one channel and didn't say
anything + one channel registered

-SpamServ- Status:
-SpamServ- Total Users Online: 10001
-SpamServ- Registered Channels: 1
-SpamServ- Memory Information:
-SpamServ- Channel Memory Usage: 30 Byte; 0.0292969
KiloByte; 2.86102e-05 MegaByte
-SpamServ- User Memory Usage : 520072 Byte; 507.883
KiloByte; 0.495979 MegaByte
-SpamServ- Total Memory Usage : 520102 Byte;
507.912 KiloByte; 0.496008 MegaByte

---------------------

10000 users, who are spamming in a chan + one channel
registered

-SpamServ- Status:
-SpamServ- Total Users Online: 10001
-SpamServ- Registered Channels: 1
-SpamServ- Memory Information:
-SpamServ- Channel Memory Usage: 30 Byte; 0.0292969
KiloByte; 2.86102e-05 MegaByte
-SpamServ- User Memory Usage : 720072 Byte; 703.195
KiloByte; 0.686714 MegaByte
-SpamServ- Total Memory Usage : 720102 Byte;
703.225 KiloByte; 0.686743 MegaByte

---

Of course SpamServ doesn't allocate memory, when a
user joins a channel, which is not registered with
SpamServ.

SpamServ will delete useless or old memory by itself,
e.g. when a user joins a channel, SpamServ creates a
joinfloodNode to

check, if the user creates join/part spam. After ~7
minutes SpamServ will delete the memory of that
joinfloodNode.

If a user joins 20 Channels, which are registered with
SpamServ and idles in the channels for a few hours,
SpamServ only

needs 28 bytes to save all information about that user.
It removes all memory allocated to check for flood and
joinflood.

That means, SpamServ can handle hundreds/thousands
of users without using too much memory.

If you want a proof that SpamServ can handle so many
users, see this log: http://feigling.de.ms/SpamServ-
Chan-Log.log

---

If you have any questions/suggestions/bug reports,
email feigling@gamesurge.net or pm me in #srvx on
GameSurge.

Discussion

1 2 > >> (Page 1 of 2)
  • feigling

    feigling - 2004-02-27

    Logged In: YES
    user_id=560005

    Another information:

    "/msg opserv bind spamserv * *spamserv.*" doesn't bind
    the "/msg spamserv help" command.

    You have to do "/msg opserv bind spamserv help
    *modcmd.help" too to bind /msg spamserv help.

    Thx Tankred :)

     
  • feigling

    feigling - 2004-03-04
    • summary: SpamServ V 1.01 --> SpamServ V 1.03
     
  • feigling

    feigling - 2004-03-04

    Logged In: YES
    user_id=560005

    I added a small procedure, which prints all registered channels.
    Command: /msg spamserv status channels

    To get the memory information:
    Command: /msg spamserv status memory

    If you have problems with "/msg spamserv help", unbind the
    current help command and use "/msg opserv bind spamserv
    help *modcmd.help -" to bind it.

    srvx has a small bug, so it doesn't bind commands correctly.

    You do NOT need to update SpamServ, if you don't
    need "/msg spamserv status channels".

    I tried to create a spamserv 1.01 -> 1.03 patch but the
    patch didn't work correctly, so if you want to use the new
    patch, you have to use a fresh copy of srvx. I'll try to create
    a 1.01 -> 1.03 again.

     
  • feigling

    feigling - 2004-03-04

    Logged In: YES
    user_id=560005

    It seems, SourceForge removed the $ char from the "/msg
    opserv bind spamserv help ..." command.

    Add a $ char "/msg opserv bind spamserv
    help *modcmd.help 1-" in front of "1-".

     
  • feigling

    feigling - 2004-03-16
    • summary: SpamServ V 1.03 --> SpamServ V 1.04
     
  • feigling

    feigling - 2004-03-16

    Logged In: YES
    user_id=560005

    Added:

    - You can enable/disable, if SpamServ has to join the new
    channel on channel moves/merges.
    If it's enabled, SpamServ will join the new channel and leave
    the old channel.
    If it's disabled, SpamServ will leave and unregister the old
    channel.
    - Users are allowed to use the "#" character, when there is a
    space after it, e.g. "# " even when "AdvScan" is enabled.
    SpamServ doesn't interpret it as advertisement anymore.

     
  • Dave Reade

    Dave Reade - 2004-03-17

    Logged In: YES
    user_id=860012

    Bug found:

    1. Register a channel.
    2. Register SpamServ to the channel.
    3. Suspend the channel.
    4. Unsuspend the channel or wait for the suspend to expire.
    5. ChanServ rejoins, SpamServ doesn't.
    6. Typing "/msg SpamServ register #channel" produces "-
    SpamServ- #channel is already registered".
    7. Unregister SpamServ from channel and re-register; fixed.

     
  • feigling

    feigling - 2004-03-17

    Logged In: YES
    user_id=560005

    * Now talking in #test
    -> *chanserv* register #test feigling
    * ChanServ (ChanServ@Services.FeigNET) has joined #test
    * Services.FeigNET sets mode: +o ChanServ
    -ChanServ- You now have ownership of #test.
    -> *spamserv* register #test
    * SpamServ (SpamServ@Services.FeigNET) has joined #test
    * Services.FeigNET sets mode: +o SpamServ
    -SpamServ- Channel #test registered.
    <feigling> !csuspend 10 test
    * SpamServ (SpamServ@Services.FeigNET) has left #test
    (test)
    * ChanServ (ChanServ@Services.FeigNET) has left #test
    (test)
    * ChanServ (ChanServ@Services.FeigNET) has joined #test
    * SpamServ (SpamServ@Services.FeigNET) has joined #test
    * Services.FeigNET sets mode: +oo ChanServ SpamServ

    Mhh, it's working for me, but I'll check the code.

     
  • feigling

    feigling - 2004-03-23

    Logged In: YES
    user_id=560005

    There is a small bug. When a user gets killed for flooding,
    reconnects and sends one new line, SpamServ glines him. You
    should update SpamServ.

    I updated the patch but if you don't want to apply the patch
    again (no new features), you can fix the bug manually:

    1: go to spamserv.c - line ~529
    2: remove "kNode->warnlevel = uInfo->warnlevel -
    KILL_WARNLEVEL;"
    3: replace that with

    if(uInfo->warnlevel > KILL_WARNLEVEL)
    kNode->warnlevel = uInfo->warnlevel -
    KILL_WARNLEVEL;
    else
    kNode->warnlevel = 0;

    That's all.

     
  • feigling

    feigling - 2004-03-23
    • summary: SpamServ V 1.04 --> SpamServ V 1.05
     
  • Dave Reade

    Dave Reade - 2004-03-25

    Logged In: YES
    user_id=860012

    SRVX 1.3 support ?

     
  • feigling

    feigling - 2004-03-25

    Logged In: YES
    user_id=560005

    Expect that in a few days. I have to finish translating the
    srvx files for GameSurge first.

     
  • feigling

    feigling - 2004-04-05
    • summary: SpamServ V 1.05 --> SpamServ V 1.06
     
  • feigling

    feigling - 2004-04-05

    Logged In: YES
    user_id=560005

    I modified the spamserv code and it should work with srvx-
    1.3 - patch-32.
    You can download this version here:
    http://cesnet.dl.sourceforge.net/sourceforge/srvx/srvx-1.3-
    pre0.tar.gz
    Due to a srvx bug with timeq (on Cygwin), I couldn't check all
    functions, if they work correctly, so if you find a bug, pm me
    on GameSurge and i'll fix that.

     
  • Dave Reade

    Dave Reade - 2004-04-09

    Logged In: YES
    user_id=860012

    Compile bug (Patch 47):

    spamserv.c: In function `init_spamserv':
    spamserv.c:1948: error: too few arguments to function
    `AddService'
    spamserv.c:1987: error: too many arguments to function
    `service_register'

     
  • feigling

    feigling - 2004-04-09

    Logged In: YES
    user_id=560005

    *shrugs* that must be hard to read my comments ...
    "I modified the spamserv code and it should work with srvx-
    1.3 - patch-32."

    It CANNOT work with 47 because the srvx devs changed the
    params of AddService and service_register.

     
  • Dave Reade

    Dave Reade - 2004-04-09

    Logged In: YES
    user_id=860012

    Hmm no need to get offended...

    I have fixed the problem myself and SpamServ works with
    patch 47, pity you couldn't have been a bit more grown up,
    as I would have been happy to share the code-fix.

     
  • feigling

    feigling - 2004-05-14

    Logged In: YES
    user_id=560005

    I modified SpamServ so it'll now run with srvx-1.3-pre1 (patch
    60). You can also try to use it with the newest patch (62),
    but I can't tell you, if it'll work correctly. If you find any bugs,
    pm me or write an email. I am sorry but I still can't add new
    features to SpamServ because srvx doesn't want to work
    properly with Cygwin on my system (damn timeq). I'll try to fix
    that bug and add some more stuff to SpamServ.

    @dave--
    I wasn't offending. I just told you, that it wasn't possible to
    use that patch with srvx (patch 47) because the devs
    modified some pieces of the code.

     
  • feigling

    feigling - 2004-05-14
    • summary: SpamServ V 1.06 --> SpamServ V 1.07
     
  • feigling

    feigling - 2004-06-27
    • summary: SpamServ V 1.07 --> SpamServ V 1.08
     
  • feigling

    feigling - 2004-06-27

    Logged In: YES
    user_id=560005

    Thiefmaster discovered a small bug. When you suspend +
    unsuspend a channel, SpamServ joins the channel, althought
    the channel might not be registered with SpamServ.

    To fix it, you can either use spamserv.patch version 1.08 or
    you can do the following:

    1: chanserv.c - line 1847 "if(spamserv && spamserv_join)"
    change it to "if(spamserv && spamserv_join && get_chanInfo
    (channel->name))"

    2: spamserv.c - line 160 "static struct chanInfo*" change it
    to "struct chanInfo*"

    3: spamserv.h - line 165 - add "struct chanInfo *get_chanInfo
    (const char *channelname);"

    and recompile.

     
  • feigling

    feigling - 2004-06-27

    SpamServ V. 1.08

     
  • Anonymous

    Anonymous - 2006-02-04

    Logged In: YES
    user_id=1444039

    When I apply the Patch Spamserv.patch to the srvx srvx
    1.3-pre1 I seem to be missing mod-spamserv.c. What am I
    doing wrong?

     
  • feigling

    feigling - 2006-02-13

    Logged In: YES
    user_id=560005

    Works fine for me. You just need to make sure you use pre1
    and not pre2 or srvx1.3 which are avaliable in the file
    section.

     
  • David P.

    David P. - 2006-07-20

    Logged In: YES
    user_id=989935

    I was just wondering if a further upgrade of this patch for compatibility with
    1.3.1 is going to be created (as I noticed many small code changes relating to
    areas that the patch effects). If anyone else has integrated this patch into a
    working copy of 1.3.1, if there is any possibility that I could have a copy of said
    patch, it would be highly appreciated.

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.