]> jfr.im git - irc/rqf/shadowircd.git/commitdiff
Allow /ojoin !#channel/%#channel, if admin/halfop are enabled.
authorB.Greenham <redacted>
Sun, 4 Apr 2010 19:58:07 +0000 (15:58 -0400)
committerB.Greenham <redacted>
Sun, 4 Apr 2010 19:58:07 +0000 (15:58 -0400)
TODO-SHADOW
extensions/README
extensions/m_ojoin.c

index 4ef2bfbabc6bb2a95344647efb0f2503992e2aeb..447dc22905ae8443a1af03d3c5a91b00fe51ac9b 100644 (file)
@@ -1,6 +1,5 @@
 Todo list for ShadowIRCd 6.1
 -----------------------------
-* update ojoin/omode/etc to use +ah
 * notice/message !#channel and %#channel
 * Add a disable_oper option to auth {} to not allow users in that auth block
   to use OPER.
index 9ba97b1e6d106e22ab408af6101692921931405a..877f026e1568c6eb9804831760622970e9bfa140 100644 (file)
@@ -36,7 +36,7 @@ m_oaccept.c    - OACCEPT - Add metadata to a user that will allow you to
                  Syntax: OACCEPT <nick>
 
 m_ojoin.c      - OJOIN - Join a channel through any modes or limits with 
-                         an optional status (@+)
+                         an optional status (!@%+)
                  Syntax: OJOIN [status]<channel>
 
 m_olist.c      - OLIST - Lists channels like LIST, but shows hidden
index 239cd447ca5ccd5836a22502f3029054a3292baa..8c29f6dd5bb1db22c7dce942b978439994d18ad1 100644 (file)
@@ -65,7 +65,7 @@ mo_ojoin(struct Client *client_p, struct Client *source_p, int parc, const char
                return 0;
        }
 
-       if(*parv[1] == '@' || *parv[1] == '%' || *parv[1] == '+')
+       if(*parv[1] == '@' || *parv[1] == '%' || *parv[1] == '+' || *parv[1] == '!')
        {
                parv[1]++;
                move_me = 1;
@@ -98,7 +98,20 @@ mo_ojoin(struct Client *client_p, struct Client *source_p, int parc, const char
                        me.name, parv[1],
                        source_p->name, source_p->username, source_p->host);
 
-       if(*parv[1] == '@')
+       if(*parv[1] == '!' && ConfigChannel.use_admin)
+       {
+               add_user_to_channel(chptr, source_p, CHFL_ADMIN);
+               sendto_server(client_p, chptr, CAP_TS6, NOCAPS,
+                             ":%s SJOIN %ld %s + :!%s",
+                             me.id, (long) chptr->channelts, chptr->chname, source_p->id);
+               sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN %s",
+                                    source_p->name,
+                                    source_p->username, source_p->host, chptr->chname);
+               sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +a %s",
+                                    me.name, chptr->chname, source_p->name);
+
+       }
+       else if(*parv[1] == '@')
        {
                add_user_to_channel(chptr, source_p, CHFL_CHANOP);
                sendto_server(client_p, chptr, CAP_TS6, NOCAPS,
@@ -111,6 +124,18 @@ mo_ojoin(struct Client *client_p, struct Client *source_p, int parc, const char
                                     me.name, chptr->chname, source_p->name);
 
        }
+       else if(*parv[1] == '%' && ConfigChannel.use_halfop)
+       {
+               add_user_to_channel(chptr, source_p, CHFL_HALFOP);
+               sendto_server(client_p, chptr, CAP_TS6, NOCAPS,
+                             ":%s SJOIN %ld %s + :%s%s",
+                             me.id, (long) chptr->channelts, chptr->chname, "%", source_p->id);
+               sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN %s",
+                                    source_p->name,
+                                    source_p->username, source_p->host, chptr->chname);
+               sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +h %s",
+                                    me.name, chptr->chname, source_p->name);
+       }
        else if(*parv[1] == '+')
        {
                add_user_to_channel(chptr, source_p, CHFL_VOICE);