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: ns_ajoin  (Read 46820 times)

0 Members and 1 Guest are viewing this topic.

katsklaw

  • Guest
(No subject)
« Reply #25 on: August 10, 2007, 12:08:18 AM »

ok I could be wrong and any coder can correct me :). but 3rd party modules are triggered on events before the core is, this is to allow 3rd party module intervention otherwise you would have the core denying access or other reactions prior to the module that has been written to change the behaviour of the command/feature in question.

Alternately, a callback could be used to add a dely to ajoin although the callback wouldn't be able to copmensate for latency.
Logged

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
(No subject)
« Reply #26 on: August 10, 2007, 12:41:29 AM »

well as i see it, the event should be send after the identify is completed. The core in this specific case sends the event before applying the vhost. And since the vhost is assigned  by the same code that deals with the identify, it s not possible for a module to change this behaviour by for example returning MOD_STOP in the event.
Code: [Select]
...
            }
        }
        send_event(EVENT_NICK_IDENTIFY, 1, u->nick);
        alog("%s: %s!%s@%s identified for nick %s", s_NickServ, u->nick,
             u->username, u->host, u->nick);
        notice_lang(s_NickServ, u, NICK_IDENTIFY_SUCCEEDED);
        if (ircd->vhost) {
            do_on_id(u);
        }
        if (NSModeOnID) {
            do_setmodes(u);
        }
...

Just seems a bit weird to send the event in the middle of the function...
Then again if it was send at the end, modules like cs_accessfounder wouldn't be able to have the correct modes set automatically in one line.. so i guess it just depends on what you want to do with the event.
nvm me :)

doesn't matter that much anymore either, already hooked it to the identify command instead of the interal event :)
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)

katsklaw

  • Guest
(No subject)
« Reply #27 on: August 10, 2007, 12:56:08 AM »

EVENT_NICK_IDENTIFY is likely sent at EVENT_START as with other events. Which can be useful in some instances where your module is attempting to block a users actions such as joining a forbidden channel.
Logged

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
(No subject)
« Reply #28 on: August 10, 2007, 11:21:56 PM »

Released v4.1.8 which fixes the earlier mentioned issue. The module now also performs the ajoining upon UPDATE.

The module has now been published on the modules site since I think it should be stable enough for use on production networks.

Quote
Which can be useful in some instances where your module is attempting to block a users actions such as joining a forbidden channel.

Yea, like I said, like it s send, it s useful in some cases, just didn't turn out to be in mine :)
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)

CuttingEdge

  • Guest
(No subject)
« Reply #29 on: August 13, 2007, 08:35:14 PM »

Great stuff! Module works like a charm. Well done! :P
Logged

CuttingEdge

  • Guest
(No subject)
« Reply #30 on: August 14, 2007, 07:15:05 PM »

Services tends to segfault whenever a non-registered nickname attempts to use any of the AJOIN commands though.

I'm using Anope 1.7.19 with UnrealIRCd 3.2.6 on a Debian Linux system.

[Edited on 14-8-2007 by CuttingEdge]
Logged

katsklaw

  • Guest
(No subject)
« Reply #31 on: August 14, 2007, 11:40:17 PM »

Quote
Originally posted by CuttingEdge
Services tends to segfault whenever a non-registered nickname attempts to use any of the AJOIN commands though.

I'm using Anope 1.7.19 with UnrealIRCd 3.2.6 on a Debian Linux system.

[Edited on 14-8-2007 by CuttingEdge]


[18.39.16] * Your nick is now blahblah
-
[18.39.19] -NickServ-  Syntax: AJOIN { ADD | DEL | LIST | CLEAR } [channel] [key]
-
[18.39.22] [Misc] *** LocOps -- Server services.ircmojo.net[1.2.3.4] closed the connection


Confirned on Unreal-3.2.7, Anope-1.7.19 over FreeBSD.

[Edited on 14-8-2007 by katsklaw]
Logged

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
(No subject)
« Reply #32 on: August 15, 2007, 12:06:07 AM »

Darn my mistake...
I will publish an newer version of the module tomorrow.

For now you can use the devel version here: http://vips.hopto.org/~viper/ns_ajoin.c
It fixes the issue but I also want to add windows support in this release so gonna do that tomorrow before I publish it...

[Edited on 15-8-2007 by Viper]
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)

CuttingEdge

  • Guest
(No subject)
« Reply #33 on: August 15, 2007, 04:13:26 PM »

Thanks for the quick response. I'll test it on my network this evening.
Logged

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
(No subject)
« Reply #34 on: August 15, 2007, 11:01:32 PM »

Published an updated version on the modules site.
If you downloaded the devel version earlier, i reommend downloading te final 4.1.9 since the fix for windows also prevents an issue that could occur in the previous devel when the services are running in debug mode...

Changelog:
 - Added win32 support
 - Fixed segfault when AJOIN is used by an unregistered user

edit: i just received report of yet another segfault occuring when nicks are dropped and the db is saved. I added checks to prevent this, but apparently something s still going wrong. Will publish yet another new version tomorrow when i ve found the cause of this..

edit2: apparently there is some problem when the DB saving routines stumbles upon a dropped nick. I recommend to not use this module unless i can solve the problem. This might take a while.. i found the problem, but have no fix..

[Edited on 16-8-2007 by Viper]
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
(No subject)
« Reply #35 on: August 17, 2007, 11:23:56 AM »

ok this will take a while...
I have to rewrite the way the module stores its ajoin list internally because of limitations in C and anope itself...

Till i find another way to implement it, i recommend everyone stops using the modue..
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
(No subject)
« Reply #36 on: August 20, 2007, 09:12:22 PM »

i need some people to test the new release...

a devel version of the new release that should resolve all crash bugs can be downloaded from here.

Could some people try this out on their (test)nets, preferably with over 10 people who have an ajoin list and let this run for at least 24hrs. The fix does use more slighly  cpu cycles and memory; i ll look for ways to reduce this later, but atm getting a new stable out should have priority.

edit: this is not yet meant for use on large production networks. I programmed it so certain circumstances that would normally only arrive with over a 1000 ajoin lists would occur with less then 10, making it very unsuitable for large nets, but shouldn't affect small testnets or nets with few users.

[Edited on 20-8-2007 by Viper]
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
(No subject)
« Reply #37 on: August 24, 2007, 01:18:49 PM »

Released... since no1 reported anything about crashes i m hoping it s finally entirely stable..

http://modules.anope.org/viewmod.php?id=96
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)

CuttingEdge

  • Guest
Latest SVN triggers errors
« Reply #38 on: September 05, 2007, 11:19:29 AM »

Looks like this module does not work with the latest SVN of Anope. It complains about too few arguements in the 'anope_cmd_svsjoin' function within 'do_identify'.

Might have something to do with this: "Added support for channel keys to UnrealIRCd 3.2 SVSJOIN command"

I hope this helps.

[Edited on 5-9-2007 by CuttingEdge]
Logged

heinz

  • Guest
(No subject)
« Reply #39 on: September 05, 2007, 11:54:46 AM »

Think Viper knows about this and is just waiting for 1.7.20 to be release - he was the one that reported the issue! :)
Logged

CuttingEdge

  • Guest
(No subject)
« Reply #40 on: September 05, 2007, 12:54:48 PM »

Good stuff. Thanks for the reply! :)
Logged

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
(No subject)
« Reply #41 on: September 05, 2007, 01:51:06 PM »

yeah.. i have a new version of ns_ajoin just waiting for 1.7.20 :)
Can't publish it yet because most regular users wouldn't know how to get SVN and it would no longer compile on 1.7.19 so just wait a bit :)
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)

SNU

  • Anope User
  • Offline Offline
  • Posts: 158
    • http://www.firstclassirc.com
(No subject)
« Reply #42 on: September 05, 2007, 09:52:32 PM »

I would know but I wont use svn on my ircd :D
Logged

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
(No subject)
« Reply #43 on: September 05, 2007, 10:24:49 PM »

/Me always uses SVN

partially cuz it s easier to update **lazy** :)
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)

click

  • Guest
(No subject)
« Reply #44 on: October 07, 2007, 10:11:09 AM »

Actually, a small hack to the code is enough... Though it might be a bit scary, as I haven't read through the code properly...
Feeding the SVSJOIN with a NULL pointer for the password-string works for channels that doesn't need it...
Code: [Select]

Change:
 anope_cmd_svsjoin(s_NickServ, u->nick, ac->channel);

to:
 anope_cmd_svsjoin(s_NickServ, u->nick, ac->channel, NULL);


Just a quick 'hackup', possibly we lose out on a byte as we don't feed the routine properly, but - hm, it works for me...
Logged

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
(No subject)
« Reply #45 on: October 07, 2007, 11:28:32 AM »

true that will solve your not compiling problem, but it doesn't solve the issue of the module not properly joining users to +k channels... the renewed anope_cmd_svsjoin() takes a password (third arg) as well, but only works on unreal... had to work around that on the other ircd

/Me still waiting to release .14 :)

It fixes following issues atm...

Code: [Select]

 *    4.1.14 Fixed ajoin failing under several conditions on a channel with +k..
 *           Added ban testing and unbanning if possible...
 *           Because UnrealIRCd is the only IRCd supporting SVSJOIN'ing to +k chans
 *               we now invite before joining on all IRCd's except unreal.
 *           We no longer unban the user if he is excepted...
 *           Added hooks for NS ID.
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)

click

  • Guest
(No subject)
« Reply #46 on: October 14, 2007, 02:43:05 AM »

Also noticed that it doesn't always enforce users to join the channels set.
This might be something related to Inspircd however, so I'll tie my shoes and wait for the next release as well...
* unloaded module and waiting for next anope-release *
Logged

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
(No subject)
« Reply #47 on: October 14, 2007, 12:44:51 PM »

Quote
Originally posted by click
Also noticed that it doesn't always enforce users to join the channels set.
This might be something related to Inspircd however, so I'll tie my shoes and wait for the next release as well...

I thought i fixed the not joining issue in 4.1.13....
i never got around to setting up an inspircd testnet though.
So even though the module s supposed to work on all ircds with svsjoin, i only tested it on ultimate and unreal...
so a bit more details on the not joining all channels would be appreciated :)


Ps: and yeah, if it were me, i wouldn't use the version currently on the modules site either :)
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)

SNU

  • Anope User
  • Offline Offline
  • Posts: 158
    • http://www.firstclassirc.com
(No subject)
« Reply #48 on: December 31, 2007, 05:34:44 PM »

Hi Viper. Come on and release .14 ;P
I can't compile .13 on anopes .20 :D

Cu in .08 ^^ hehe
Logged

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
(No subject)
« Reply #49 on: January 01, 2008, 01:05:25 AM »

.13 wasn't really meant for use on a live net anyways.. was a bit buggy imho

if i m not mistaken .14 was finished months ago and was simply waiting for .20 to be released... it neede the changes made  to svsjoin :)
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)
Pages: 1 [2] 3   Go Up