try again
This commit is contained in:
parent
cf20f17777
commit
107ea7e7f0
1 changed files with 30 additions and 18 deletions
|
@ -19,7 +19,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||||
* USA
|
* USA
|
||||||
*
|
*
|
||||||
* $Id: m_sjoin.c,v 1.12 2002/10/15 07:37:57 fishwaldo Exp $
|
* $Id: m_sjoin.c,v 1.13 2002/10/15 07:58:13 fishwaldo Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "stdinc.h"
|
#include "stdinc.h"
|
||||||
|
@ -63,7 +63,7 @@ _moddeinit(void)
|
||||||
mod_del_cmd(&sjoin_msgtab);
|
mod_del_cmd(&sjoin_msgtab);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *_version = "$Revision: 1.12 $";
|
const char *_version = "$Revision: 1.13 $";
|
||||||
#endif
|
#endif
|
||||||
/*
|
/*
|
||||||
* ms_sjoin
|
* ms_sjoin
|
||||||
|
@ -369,19 +369,29 @@ static void ms_sjoin(struct Client *client_p,
|
||||||
{
|
{
|
||||||
fl = 0;
|
fl = 0;
|
||||||
num_prefix = 0;
|
num_prefix = 0;
|
||||||
|
switch (*s) {
|
||||||
for (i = 0; i < 2; i++)
|
case '!':
|
||||||
{
|
fl |= MODE_ADMIN;
|
||||||
if (*s == '!')
|
case '@':
|
||||||
|
fl |= MODE_CHANOP;
|
||||||
|
case '+':
|
||||||
|
fl |= MODE_VOICE;
|
||||||
|
case '%':
|
||||||
|
fl |= MODE_HALFOP;
|
||||||
|
}
|
||||||
|
*hops++ = *s;
|
||||||
|
s++;
|
||||||
|
#if 0
|
||||||
|
if (*s == '!')
|
||||||
{
|
{
|
||||||
fl |= MODE_ADMIN;
|
fl |= MODE_ADMIN;
|
||||||
if (keep_new_modes || IsOper(find_client(s++)))
|
if (keep_new_modes)
|
||||||
{
|
{
|
||||||
*hops++ = '!';
|
*hops++ = *s;
|
||||||
num_prefix++;
|
num_prefix++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// s++;
|
s++;
|
||||||
}
|
}
|
||||||
if (*s == '@')
|
if (*s == '@')
|
||||||
{
|
{
|
||||||
|
@ -416,8 +426,7 @@ static void ms_sjoin(struct Client *client_p,
|
||||||
|
|
||||||
s++;
|
s++;
|
||||||
}
|
}
|
||||||
}
|
#endif
|
||||||
|
|
||||||
/* if the client doesnt exist, backtrack over the prefix (*@%+) that we
|
/* if the client doesnt exist, backtrack over the prefix (*@%+) that we
|
||||||
* just added and skip to the next nick
|
* just added and skip to the next nick
|
||||||
*/
|
*/
|
||||||
|
@ -434,15 +443,13 @@ static void ms_sjoin(struct Client *client_p,
|
||||||
goto nextnick;
|
goto nextnick;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* copy the nick to the two buffers */
|
|
||||||
hops += ircsprintf(hops, "%s ", s);
|
|
||||||
assert((hops - sjbuf_hops) < sizeof(sjbuf_hops));
|
|
||||||
|
|
||||||
if (!keep_new_modes && !IsOper(target_p))
|
if (!keep_new_modes && !IsOper(target_p))
|
||||||
{
|
{
|
||||||
if ((fl & MODE_CHANOP) || (fl & MODE_HALFOP) || (fl & MODE_ADMIN))
|
if ((fl & MODE_CHANOP) || (fl & MODE_HALFOP) || (fl & MODE_ADMIN) || fl & MODE_VOICE)
|
||||||
{
|
{
|
||||||
fl = MODE_DEOPPED;
|
fl = MODE_DEOPPED;
|
||||||
|
hops -= 1;
|
||||||
|
*hops = '\0';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -450,6 +457,11 @@ static void ms_sjoin(struct Client *client_p,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* copy the nick to the two buffers */
|
||||||
|
hops += ircsprintf(hops, "%s ", s);
|
||||||
|
assert((hops - sjbuf_hops) < sizeof(sjbuf_hops));
|
||||||
|
|
||||||
people++;
|
people++;
|
||||||
|
|
||||||
/* LazyLinks - Introduce unknown clients before sending the sjoin */
|
/* LazyLinks - Introduce unknown clients before sending the sjoin */
|
||||||
|
|
Reference in a new issue