Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: More events and on different stages  (Read 5771 times)

0 Members and 1 Guest are viewing this topic.

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
More events and on different stages
« on: August 17, 2007, 10:05:47 AM »

I have run into this problem more then once...
Many events are only send after the core has done its work. In the case of expiring nicknames for example it means that by the time the event is send, no data in the nick still exists. If the module stores data in the ModuleData for example it means the module can't do anything anymore either.

Another example is the identify event: the event is send in the middle of the core code. So before the core has finished setting stuff like vhosts, but after setting some other things lke +r.

I think it would be very useful to have that kind of events send in different stages and it doesn't require a lot of changes either. For example sending an event before the nickname is dropped and after or before and after the nickname is identified, maybe even with a third event before the channel modes on the user are being set.

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

Pieter Bootsma

  • Team
  • *
  • Offline Offline
  • Posts: 189
    • http://geniusdex.net/
(No subject)
« Reply #1 on: August 18, 2007, 06:44:09 PM »

The whole event system will be re-done for 1.9, and the core should be using them itself as well. I hadn't thought of the multiple stages yet, but i'll note it down.
Logged

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
(No subject)
« Reply #2 on: August 20, 2007, 11:51:18 AM »

as an extension to this, it would be very useful if modules could create their own events. This way different modules could more easily interact without having to duplicate all the logic.
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)

Pieter Bootsma

  • Team
  • *
  • Offline Offline
  • Posts: 189
    • http://geniusdex.net/
(No subject)
« Reply #3 on: August 20, 2007, 03:26:14 PM »

Quote
Originally posted by Viper
as an extension to this, it would be very useful if modules could create their own events. This way different modules could more easily interact without having to duplicate all the logic.


That too is in the planning :)
Logged

katsklaw

  • Guest
(No subject)
« Reply #4 on: August 21, 2007, 12:20:48 AM »

although such modules would have to insure that their dependencies are present, perhaps via findmodule()
Logged
Pages: [1]   Go Up