Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1] 2 3   Go Down

Author Topic: [Request] fix cs_chanlimit  (Read 38972 times)

0 Members and 1 Guest are viewing this topic.

chasingsol

  • Guest
[Request] fix cs_chanlimit
« on: February 12, 2006, 06:18:44 PM »

Greetings all,

As some of you are aware, Trystan spent a great deal of time working on a module I commissioned to create a channel limit module that mimics the functionality of the common channel limiting eggdrop script. Unfortunately, while the module is completed there is a lockup problem that manifests itself. Trystan is unsure where this is occurring. Full details can be found on the prior SearchIRC forum at http://searchirc.com/boards/viewtopic.php?t=4515

I'd like to respectfully request the Anope developers take a look. This module is extremely useful and I believe it would be a popular module for additional functionality in channel control.

I've taken the liberty of hosting the file on my own bandwidth, out of deference to Trystan. The original links can still be found within the above link.

cs_chanlimit.tar.gz

**Warning** This module WILL make your Anope freeze up! Not for Anope 1.6.x

Cheers,

Mark
chasingsol @ irc.p2p-irc.net

[Edited on 2-12-2006 by chasingsol]
Logged

Tom65789

  • Anope User
  • Offline Offline
  • Posts: 343
    • www.t65789.co.uk
(No subject)
« Reply #1 on: February 12, 2006, 06:25:14 PM »

yer that is one awesome module, it dont work right for some reason for me :<

it puts the +l down once then stops doesnt put the +l up either and no this isnt a full lock of the services as everything else still functions.

this is one wierd module and yes its in need of work but i thank Trystan for such an excellent module

SkaterStuff

  • Guest
(No subject)
« Reply #2 on: February 13, 2006, 05:36:27 PM »

hmm i don't use the anope one but i do have one that is called limitserv :) and works good.
Logged

Tom65789

  • Anope User
  • Offline Offline
  • Posts: 343
    • www.t65789.co.uk
(No subject)
« Reply #3 on: February 14, 2006, 03:59:45 PM »

i have noticed when i had cs_ihabitregistered loaded AND cs_chanlimit loaded and running in a few Channels it wasnt locking up and has been working sort of ok, with the exception of it not including itself in the +l so u have to increase it by 6 each time to get the 5 spread, just it doesnt always change the limit so its good and bad in its ways

chasingsol

  • Guest
(No subject)
« Reply #4 on: February 15, 2006, 05:41:50 AM »

If one of the devs is willing, I might be up to commissioning this modules completion. Please drop me a line.

Cheers,

Mark.
Logged

Dave Robson

  • Team
  • *
  • Offline Offline
  • Posts: 357
(No subject)
« Reply #5 on: February 15, 2006, 08:10:40 AM »

I did give it a try, but when i loaded it up, it just plain didnt work it was obviously something i was doing/something in my setup but i didnt spend any length of time trying to find out what.

Are there any special settings it needs? for example, i had users join/parting the channel, and it did nothing (cept the initial +l when i turned it on) if so i can set them and give it another look - all i wanted to see was the freezing problem :)
Logged

Tom65789

  • Anope User
  • Offline Offline
  • Posts: 343
    • www.t65789.co.uk
(No subject)
« Reply #6 on: February 15, 2006, 04:28:05 PM »

i had that same issue Rob it only changed the +l on turning on and off, but this wasnt a full lock up of the services for me as everything else functioned fine

chasingsol

  • Guest
(No subject)
« Reply #7 on: February 18, 2006, 01:08:24 AM »

Well, I guess the question is.. would anyone be willing to give writing this module a go? It would be a good addition.
Logged

Trystan Scott Lee

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 343
(No subject)
« Reply #8 on: February 18, 2006, 02:10:10 AM »

okay I am going to work on it again.. without the internal anope callback stuff which is where I fear the problem has been all along.. which will kinda make the timer system useless and less like the eggdrops but would avoid any core problems
Logged
my God my tourniquet, return to me salvation

SkaterStuff

  • Guest
(No subject)
« Reply #9 on: February 18, 2006, 02:18:46 AM »

But wont that slow it down?
Logged

Trystan Scott Lee

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 343
(No subject)
« Reply #10 on: February 18, 2006, 02:22:55 AM »

No.. the callback() functions are the slow point, they have to be set, the core then has to keep track of them and call them back. Without times the mode would be set right there and there and there is no waiting and perphas lock up in the core due to some issue, and this way its out of the core and straight module so if it locks up it would be clearly in the module doing some thing in a loop which the code doesn't have
Logged
my God my tourniquet, return to me salvation

Tom65789

  • Anope User
  • Offline Offline
  • Posts: 343
    • www.t65789.co.uk
(No subject)
« Reply #11 on: February 18, 2006, 10:56:39 AM »

hey Trystan i know this is a big thing to ask, but could you add an option so it HAS to be on in all channels and only IRC Operators can turn it off change the variance and such like, but make it optional as not everyone will want it.

Trystan Scott Lee

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 343
(No subject)
« Reply #12 on: February 28, 2006, 01:38:22 AM »

Okay since I about broke my ankle on sunday.. and can't move around worked on chanlimit a bit, some minor tweaks, more debug messages and also set it up so that you don't have to use the internal anope call back.

1.0.5
- Fixed defines not showing what function was being called
- new option ChanLimitNoTimers to not use the core Anope timers and just go straight to
  setting the mode.
- removed debug: from in front of the config file alog() messages
- show the module name and extension in the debug messages.
- on module load it will set the modes on channels

http://www.nomadinc.net/mymods/chanlimit/cs_chanlimit.c
http://www.nomadinc.net/mymods/chanlimit/cs_chanlimit.h
http://www.nomadinc.net/mymods/chanlimit/readme.txt
Logged
my God my tourniquet, return to me salvation

Tom65789

  • Anope User
  • Offline Offline
  • Posts: 343
    • www.t65789.co.uk
(No subject)
« Reply #13 on: February 28, 2006, 03:03:25 AM »

nice work Trystan, sorry to hear about your ankle though, hope it gets better soon

but i get an error when trying to compile and its 3AM now lol

Code: [Select]

cs_chanlimit.c
cs_chanlimit.c(251) : error C2065: '__PRETTY_FUNCTION__' : undeclared identifier

NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'

[Edited on 28-2-2006 by Tom65789]

chasingsol

  • Guest
(No subject)
« Reply #14 on: February 28, 2006, 03:07:10 AM »

Same, hope you get better soon.

Regarding this, you say you've removed calling the Anope timers... does that mean there are no timers at all and changes are instant, or have you incorporated your own? I ask since I ended up trying out LimitServ with NeoStats 3, which worked, but alpha software is alpha for a good reason, so that lasted less than 24 hours. I really want this functionality in Anope, since it's a better fit rather than installing an entire package to do one thing, but need to know if I'm going to lock up services before so I know what to expect!

Thanks again!
Logged

Tom65789

  • Anope User
  • Offline Offline
  • Posts: 343
    • www.t65789.co.uk
(No subject)
« Reply #15 on: February 28, 2006, 03:17:05 AM »

its optional now, you can remove the timers by putting "ChanLimitNoTimers" into the Services.conf file otherwise there will be timers

Trystan Scott Lee

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 343
(No subject)
« Reply #16 on: February 28, 2006, 03:22:40 AM »

This option removes using timers (callbacks) period in the module, problem with modules is that they can't run on a loop timer like the core can, they must use the callback system. the option now just sets the mode, if that works prefectly then its down to the callback code which I can't control from a module.

Tom.. yeah damm winshit.. okay will fix for win32
Logged
my God my tourniquet, return to me salvation

chasingsol

  • Guest
(No subject)
« Reply #17 on: February 28, 2006, 06:42:42 AM »

Ok, understood. Will try the module tomorrow when I can monitor it, rather than cratering services overnight and coming back to a few thousands pm's.
Logged

Dave Robson

  • Team
  • *
  • Offline Offline
  • Posts: 357
(No subject)
« Reply #18 on: February 28, 2006, 07:56:57 AM »

After all the various comments about problems with callbacks and in the core etc, i tried to get this module to work, but something must be screwy in my conf or something, so wrote another limit module using module callbacks and module data etc... So far i've not seen any lockups (we're using it in #anope atm), if anyone who had the lockup issue could try it out just as a test and let me know?  :/

http://www.anope.org/modules/cs_limit.c

http://www.anope.org/modules/cs_limit.zip ( win32 dll for 1.7.13-svn.969 )

if anyone can get this to lockup or anything and has a bit of time to kill helping me debug what is wrong - i'll give you a virtual cookie*




* cookie may not actaully exist.


[Edited on 28-2-2006 by Rob]
Logged

Tom65789

  • Anope User
  • Offline Offline
  • Posts: 343
    • www.t65789.co.uk
(No subject)
« Reply #19 on: February 28, 2006, 08:07:36 AM »

Quote
Originally posted by Trystan
This option removes using timers (callbacks) period in the module, problem with modules is that they can't run on a loop timer like the core can, they must use the callback system. the option now just sets the mode, if that works prefectly then its down to the callback code which I can't control from a module.

Tom.. yeah damm winshit.. okay will fix for win32


i hate windows too, but people who try this on windows are gonna be asking. THanks for the great work Trystan

Caustic

  • Guest
(No subject)
« Reply #20 on: February 28, 2006, 11:50:22 AM »

i got this error when compile it


 -I../../include -c cs_limit.c
cs_limit.c: In function `AnopeInit':
cs_limit.c:100: error: `EVENT_CHAN_KICK' undeclared (first use in this function)
cs_limit.c:100: error: (Each undeclared identifier is reported only once
cs_limit.c:100: error: for each function it appears in.)
cs_limit.c: In function `managed_add_channel':
cs_limit.c:347: error: syntax error at end of input
cs_limit.c:333: warning: unused variable `timeou'
cs_limit.c:332: warning: unused variable `buff'
make[1]: *** [cs_limit.o] Error 1
make[1]: Leaving directory `/home/pusluircd/anope/src/modules'
make: *** [modules] Error 2
Logged

Dave Robson

  • Team
  • *
  • Offline Offline
  • Posts: 357
(No subject)
« Reply #21 on: February 28, 2006, 01:04:04 PM »

It needs svn, i dont know exactly which version, im using Anope-1.7.13-svn: (962)
Logged

chasingsol

  • Guest
(No subject)
« Reply #22 on: March 10, 2006, 02:45:13 PM »

Ok, tried this. One suggestion, it drops the limit as soon as someone leaves... possible to keep this to within the timeout period? Gets very messy during a netsplit.

[Edited on 3-10-2006 by chasingsol]
Logged

Dave Robson

  • Team
  • *
  • Offline Offline
  • Posts: 357
(No subject)
« Reply #23 on: March 10, 2006, 02:56:14 PM »

it shouldnt get messy, there is a 2 second timer on parts, if it see's more than 1 in that time it will wait and make 1 mode change.

*edit* sorry a 1 second timer, i just checked - one second is more than enough for a netsplit situation tho.


[Edited on 10-3-2006 by Rob]
Logged

Tom65789

  • Anope User
  • Offline Offline
  • Posts: 343
    • www.t65789.co.uk
(No subject)
« Reply #24 on: March 10, 2006, 05:15:29 PM »

i told you about this Rob :P

0.5 should be out soon(i hope :P)
Pages: [1] 2 3   Go Up