Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: cs_join  (Read 2882 times)

0 Members and 1 Guest are viewing this topic.

katsklaw

  • Guest
cs_join
« on: September 01, 2007, 12:51:02 AM »

This looks like a fine module for those interested in such features, however I think some of the code can be cleaned up.

Currently, n00bie, you check for each ircd that has +q/a and sets +ao and +o on all other ircds.

I think it might be easier and more dynamic to check for ircd->admin and if it returns 1 then set ircd->adminset

for example:


if (ircd->admin == 1) {
        anope_cmd_mode(s_ChanServ, av[0], "+%so %s %s", ircd->adminset, s_ChanServ, s_ChanServ);
} else{
        anope_cmd_mode(s_ChanServ, av[0], "+o %s", s_ChanServ);
}


This will also allow for additions of owner/admin supported IRCds as well as which character they use for admin without changing your source code at all.

If coded correctly it would replace all of this:


if (!stricmp(IRCDModule, "inspircd") ||
      !stricmp(IRCDModule, "plexus") ||
      !stricmp(IRCDModule, "ptlink") ||
      !stricmp(IRCDModule, "inspircd") ||
      !stricmp(IRCDModule, "ultimate2") ||
      !stricmp(IRCDModule, "unreal32") ||
      !stricmp(IRCDModule, "viagra")) {
         anope_cmd_mode(s_ChanServ, av[0], "+ao %s %s", s_ChanServ, s_ChanServ);
   } else {
      anope_cmd_mode(s_ChanServ, av[0], "+o %s", s_ChanServ);
   }


I also think you should allow Services Admins to use this command as well.

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

n00bie

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 411
(No subject)
« Reply #1 on: September 10, 2007, 07:53:05 AM »

Sorry for seeing this thread lately katsklaw. I've updated the module and here are a few changes ^^

• Cleaned up minor codes
• Added check for EVENT_PART_CHANNEL to prevent from an invite bug. ChanServ will now PART the channel if there are less than BSMinUsers on the channel.
• Added and will now respect BSMinUsers directives from services.conf. ChanServ will NOT join if there are less than 'BSMinUsers' on the channel.
• Added command support for Services Admin
Logged
I am always doing things that which I cannot do, in order that I may learn how to do it.

katsklaw

  • Guest
(No subject)
« Reply #2 on: September 10, 2007, 12:56:59 PM »

nothing to be sorry for, it's your module, you have every right to not reply at all if you wanted. :)
Logged
Pages: [1]   Go Up