69 |
unsigned int flags = 0; |
unsigned int flags = 0; |
70 |
dlink_node *ptr; |
dlink_node *ptr; |
71 |
|
|
|
/* admins only */ |
|
72 |
if (!IsAdmin(source_p)) |
if (!IsAdmin(source_p)) |
73 |
{ |
{ |
74 |
sendto_one(source_p, form_str(ERR_NOPRIVILEGES), |
sendto_one(source_p, form_str(ERR_NOPRIVILEGES), |
116 |
|
|
117 |
/* Error checking here */ |
/* Error checking here */ |
118 |
if ((chptr = hash_find_channel(name)) == NULL) |
if ((chptr = hash_find_channel(name)) == NULL) |
|
{ |
|
119 |
sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL), |
sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL), |
120 |
me.name, source_p->name, name); |
me.name, source_p->name, name); |
|
} |
|
121 |
else if (IsMember(source_p, chptr)) |
else if (IsMember(source_p, chptr)) |
|
{ |
|
122 |
sendto_one(source_p, ":%s NOTICE %s :Please part %s before using OJOIN", |
sendto_one(source_p, ":%s NOTICE %s :Please part %s before using OJOIN", |
123 |
me.name, source_p->name, name); |
me.name, source_p->name, chptr->chname); |
|
} |
|
124 |
else |
else |
125 |
{ |
{ |
126 |
add_user_to_channel(chptr, source_p, flags, NO); |
add_user_to_channel(chptr, source_p, flags, NO); |
130 |
DLINK_FOREACH(ptr, serv_list.head) |
DLINK_FOREACH(ptr, serv_list.head) |
131 |
{ |
{ |
132 |
struct Client *serv_p = ptr->data; |
struct Client *serv_p = ptr->data; |
|
if (IsDead(serv_p)) |
|
|
continue; |
|
133 |
|
|
134 |
sendto_one(serv_p, ":%s SJOIN %lu %s + :%s%s", ID_or_name(&me, serv_p), |
sendto_one(serv_p, ":%s SJOIN %lu %s + :%s%s", ID_or_name(&me, serv_p), |
135 |
(unsigned long)chptr->channelts, chptr->chname, |
(unsigned long)chptr->channelts, chptr->chname, |
140 |
|
|
141 |
sendto_channel_local(ALL_MEMBERS, NO, chptr, ":%s!%s@%s JOIN %s", |
sendto_channel_local(ALL_MEMBERS, NO, chptr, ":%s!%s@%s JOIN %s", |
142 |
source_p->name, source_p->username, |
source_p->name, source_p->username, |
143 |
source_p->host, |
source_p->host, chptr->chname); |
|
chptr->chname); |
|
144 |
|
|
145 |
if (modeletter != '\0') |
if (modeletter != '\0') |
146 |
sendto_channel_local(ALL_MEMBERS, NO, chptr, ":%s MODE %s +%c %s", |
sendto_channel_local(ALL_MEMBERS, NO, chptr, ":%s MODE %s +%c %s", |