ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/modules/m_invite.c
(Generate patch)

Comparing:
ircd-hybrid/modules/m_invite.c (file contents), Revision 32 by knight, Sun Oct 2 20:41:23 2005 UTC vs.
ircd-hybrid-7.3/modules/m_invite.c (file contents), Revision 1121 by michael, Sun Jan 9 11:03:03 2011 UTC

# Line 23 | Line 23
23   */
24  
25   #include "stdinc.h"
26 < #include "tools.h"
26 > #include "list.h"
27   #include "handlers.h"
28 – #include "common.h"
28   #include "channel.h"
29   #include "channel_mode.h"
31 – #include "list.h"
30   #include "client.h"
31   #include "hash.h"
32   #include "irc_string.h"
# Line 49 | Line 47 | struct Message invite_msgtab = {
47    { m_unregistered, m_invite, m_invite, m_ignore, m_invite, m_ignore }
48   };
49  
52 – #ifndef STATIC_MODULES
50   void
51   _modinit(void)
52   {
# Line 63 | Line 60 | _moddeinit(void)
60   }
61  
62   const char *_version = "$Revision$";
66 – #endif
63  
64   /*
65   ** m_invite
# Line 83 | Line 79 | m_invite(struct Client *client_p, struct
79    if (IsServer(source_p))
80      return;
81  
82 <  if (*parv[2] == '\0')
82 >  if (EmptyString(parv[2]))
83    {
84      sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
85                 me.name, source_p->name, "INVITE");
# Line 122 | Line 118 | m_invite(struct Client *client_p, struct
118      return;
119    }
120  
121 <  if ((ms = find_channel_link(source_p, chptr)) == NULL)
121 >  if (MyConnect(source_p) && (ms = find_channel_link(source_p, chptr)) == NULL)
122    {
123      sendto_one(source_p, form_str(ERR_NOTONCHANNEL),
124                 me.name, source_p->name, chptr->chname);
125      return;
126    }
127  
128 <  if (ConfigChannel.invite_ops_only || (chptr->mode.mode & MODE_INVITEONLY))
128 >  if ((chptr->mode.mode & (MODE_INVITEONLY | MODE_PRIVATE)))
129    {
130      if (MyConnect(source_p) && !has_member_flags(ms, CHFL_CHANOP|CHFL_HALFOP))
131      {
# Line 160 | Line 156 | m_invite(struct Client *client_p, struct
156      if (atoi(parv[3]) > chptr->channelts)
157        return;
158  
163 –  if (!MyConnect(target_p) && ServerInfo.hub &&
164 –      IsCapable(target_p->from, CAP_LL))
165 –  {
166 –    /* target_p is connected to a LL leaf, connected to us */
167 –    if (IsClient(source_p))
168 –      client_burst_if_needed(target_p->from, source_p);
169 –
170 –    if ((chptr->lazyLinkChannelExists &
171 –         target_p->from->localClient->serverMask) == 0)
172 –      burst_channel(target_p->from, chptr);
173 –  }
174 –
159    if (MyConnect(target_p))
160    {
161      sendto_one(target_p, ":%s!%s@%s INVITE %s :%s",
# Line 184 | Line 168 | m_invite(struct Client *client_p, struct
168        if (chptr->mode.mode & MODE_PRIVATE)
169        {
170          /* Only do this if channel is set +i AND +p */
171 <        sendto_channel_local(CHFL_CHANOP|CHFL_HALFOP, NO, chptr,
171 >        sendto_channel_local(CHFL_CHANOP|CHFL_HALFOP, 0, chptr,
172                               ":%s NOTICE %s :%s is inviting %s to %s.",
173                               me.name, chptr->chname, source_p->name,
174                               target_p->name, chptr->chname);

Comparing:
ircd-hybrid/modules/m_invite.c (property svn:keywords), Revision 32 by knight, Sun Oct 2 20:41:23 2005 UTC vs.
ircd-hybrid-7.3/modules/m_invite.c (property svn:keywords), Revision 1121 by michael, Sun Jan 9 11:03:03 2011 UTC

# Line 1 | Line 1
1 < Revision
1 > Id Revision

Diff Legend

– Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)