| 500 |
|
static void |
| 501 |
|
chm_nosuch(struct Client *client_p, struct Client *source_p, |
| 502 |
|
struct Channel *chptr, int parc, int *parn, |
| 503 |
< |
char **parv, int *errors, int alev, int dir, char c, void *d, |
| 504 |
< |
const char *chname) |
| 503 |
> |
char **parv, int *errors, int alev, int dir, char c, unsigned int d) |
| 504 |
|
{ |
| 505 |
|
if (*errors & SM_ERR_UNKNOWN) |
| 506 |
|
return; |
| 513 |
|
static void |
| 514 |
|
chm_simple(struct Client *client_p, struct Client *source_p, struct Channel *chptr, |
| 515 |
|
int parc, int *parn, char **parv, int *errors, int alev, int dir, |
| 516 |
< |
char c, void *d, const char *chname) |
| 516 |
> |
char c, unsigned int d) |
| 517 |
|
{ |
| 519 |
– |
long mode_type = (long)d; |
| 520 |
– |
|
| 518 |
|
if ((alev < CHACCESS_HALFOP) || |
| 519 |
< |
((mode_type == MODE_PRIVATE) && (alev < CHACCESS_CHANOP))) |
| 519 |
> |
((d == MODE_PRIVATE) && (alev < CHACCESS_CHANOP))) |
| 520 |
|
{ |
| 521 |
|
if (!(*errors & SM_ERR_NOOPS)) |
| 522 |
|
sendto_one(source_p, form_str(alev == CHACCESS_NOTONCHAN ? |
| 523 |
|
ERR_NOTONCHANNEL : ERR_CHANOPRIVSNEEDED), |
| 524 |
< |
me.name, source_p->name, chname); |
| 524 |
> |
me.name, source_p->name, chptr->chname); |
| 525 |
|
*errors |= SM_ERR_NOOPS; |
| 526 |
|
return; |
| 527 |
|
} |
| 528 |
|
|
| 529 |
|
/* If have already dealt with this simple mode, ignore it */ |
| 530 |
< |
if (simple_modes_mask & mode_type) |
| 530 |
> |
if (simple_modes_mask & d) |
| 531 |
|
return; |
| 532 |
|
|
| 533 |
< |
simple_modes_mask |= mode_type; |
| 533 |
> |
simple_modes_mask |= d; |
| 534 |
|
|
| 535 |
|
/* setting + */ |
| 536 |
|
/* Apparently, (though no one has ever told the hybrid group directly) |
| 540 |
|
* |
| 541 |
|
* -Dianora |
| 542 |
|
*/ |
| 543 |
< |
if (dir == MODE_ADD) /* && !(chptr->mode.mode & mode_type)) */ |
| 543 |
> |
if (dir == MODE_ADD) /* && !(chptr->mode.mode & d)) */ |
| 544 |
|
{ |
| 545 |
< |
chptr->mode.mode |= mode_type; |
| 545 |
> |
chptr->mode.mode |= d; |
| 546 |
|
|
| 547 |
|
mode_changes[mode_count].letter = c; |
| 548 |
|
mode_changes[mode_count].dir = MODE_ADD; |
| 552 |
|
mode_changes[mode_count].mems = ALL_MEMBERS; |
| 553 |
|
mode_changes[mode_count++].arg = NULL; |
| 554 |
|
} |
| 555 |
< |
else if (dir == MODE_DEL) /* && (chptr->mode.mode & mode_type)) */ |
| 555 |
> |
else if (dir == MODE_DEL) /* && (chptr->mode.mode & d)) */ |
| 556 |
|
{ |
| 557 |
|
/* setting - */ |
| 558 |
|
|
| 559 |
< |
chptr->mode.mode &= ~mode_type; |
| 559 |
> |
chptr->mode.mode &= ~d; |
| 560 |
|
|
| 561 |
|
mode_changes[mode_count].letter = c; |
| 562 |
|
mode_changes[mode_count].dir = MODE_DEL; |
| 571 |
|
static void |
| 572 |
|
chm_registered(struct Client *client_p, struct Client *source_p, struct Channel *chptr, |
| 573 |
|
int parc, int *parn, char **parv, int *errors, int alev, int dir, |
| 574 |
< |
char c, void *d, const char *chname) |
| 574 |
> |
char c, unsigned int d) |
| 575 |
|
{ |
| 579 |
– |
long mode_type = (long)d; |
| 580 |
– |
|
| 581 |
– |
|
| 576 |
|
if (!IsServer(source_p) && !HasFlag(source_p, FLAGS_SERVICE)) |
| 577 |
|
{ |
| 578 |
|
if (!(*errors & SM_ERR_ONLYSERVER)) |
| 579 |
|
sendto_one(source_p, form_str(alev == CHACCESS_NOTONCHAN ? |
| 580 |
|
ERR_NOTONCHANNEL : ERR_ONLYSERVERSCANCHANGE), |
| 581 |
< |
me.name, source_p->name, chname); |
| 581 |
> |
me.name, source_p->name, chptr->chname); |
| 582 |
|
*errors |= SM_ERR_ONLYSERVER; |
| 583 |
|
return; |
| 584 |
|
} |
| 585 |
|
|
| 586 |
|
/* If have already dealt with this simple mode, ignore it */ |
| 587 |
< |
if (simple_modes_mask & mode_type) |
| 587 |
> |
if (simple_modes_mask & d) |
| 588 |
|
return; |
| 589 |
|
|
| 590 |
< |
simple_modes_mask |= mode_type; |
| 590 |
> |
simple_modes_mask |= d; |
| 591 |
|
|
| 592 |
|
/* setting + */ |
| 593 |
|
/* Apparently, (though no one has ever told the hybrid group directly) |
| 597 |
|
* |
| 598 |
|
* -Dianora |
| 599 |
|
*/ |
| 600 |
< |
if (dir == MODE_ADD) /* && !(chptr->mode.mode & mode_type)) */ |
| 600 |
> |
if (dir == MODE_ADD) /* && !(chptr->mode.mode & d)) */ |
| 601 |
|
{ |
| 602 |
< |
chptr->mode.mode |= mode_type; |
| 602 |
> |
chptr->mode.mode |= d; |
| 603 |
|
|
| 604 |
|
mode_changes[mode_count].letter = c; |
| 605 |
|
mode_changes[mode_count].dir = MODE_ADD; |
| 609 |
|
mode_changes[mode_count].mems = ALL_MEMBERS; |
| 610 |
|
mode_changes[mode_count++].arg = NULL; |
| 611 |
|
} |
| 612 |
< |
else if (dir == MODE_DEL) /* && (chptr->mode.mode & mode_type)) */ |
| 612 |
> |
else if (dir == MODE_DEL) /* && (chptr->mode.mode & d)) */ |
| 613 |
|
{ |
| 614 |
|
/* setting - */ |
| 615 |
|
|
| 616 |
< |
chptr->mode.mode &= ~mode_type; |
| 616 |
> |
chptr->mode.mode &= ~d; |
| 617 |
|
|
| 618 |
|
mode_changes[mode_count].letter = c; |
| 619 |
|
mode_changes[mode_count].dir = MODE_DEL; |
| 628 |
|
static void |
| 629 |
|
chm_operonly(struct Client *client_p, struct Client *source_p, struct Channel *chptr, |
| 630 |
|
int parc, int *parn, char **parv, int *errors, int alev, int dir, |
| 631 |
< |
char c, void *d, const char *chname) |
| 631 |
> |
char c, unsigned int d) |
| 632 |
|
{ |
| 639 |
– |
long mode_type = (long)d; |
| 640 |
– |
|
| 633 |
|
if ((alev < CHACCESS_HALFOP) || |
| 634 |
< |
((mode_type == MODE_PRIVATE) && (alev < CHACCESS_CHANOP))) |
| 634 |
> |
((d == MODE_PRIVATE) && (alev < CHACCESS_CHANOP))) |
| 635 |
|
{ |
| 636 |
|
if (!(*errors & SM_ERR_NOOPS)) |
| 637 |
|
sendto_one(source_p, form_str(alev == CHACCESS_NOTONCHAN ? |
| 638 |
|
ERR_NOTONCHANNEL : ERR_CHANOPRIVSNEEDED), |
| 639 |
< |
me.name, source_p->name, chname); |
| 639 |
> |
me.name, source_p->name, chptr->chname); |
| 640 |
|
*errors |= SM_ERR_NOOPS; |
| 641 |
|
return; |
| 642 |
|
} |
| 646 |
|
{ |
| 647 |
|
if (alev == CHACCESS_NOTONCHAN) |
| 648 |
|
sendto_one(source_p, form_str(ERR_NOTONCHANNEL), |
| 649 |
< |
me.name, source_p->name, chname); |
| 649 |
> |
me.name, source_p->name, chptr->chname); |
| 650 |
|
else |
| 651 |
|
sendto_one(source_p, form_str(ERR_NOPRIVILEGES), |
| 652 |
|
me.name, source_p->name); |
| 657 |
|
} |
| 658 |
|
|
| 659 |
|
/* If have already dealt with this simple mode, ignore it */ |
| 660 |
< |
if (simple_modes_mask & mode_type) |
| 660 |
> |
if (simple_modes_mask & d) |
| 661 |
|
return; |
| 662 |
|
|
| 663 |
< |
simple_modes_mask |= mode_type; |
| 663 |
> |
simple_modes_mask |= d; |
| 664 |
|
|
| 665 |
< |
if (dir == MODE_ADD) /* && !(chptr->mode.mode & mode_type)) */ |
| 665 |
> |
if (dir == MODE_ADD) /* && !(chptr->mode.mode & d)) */ |
| 666 |
|
{ |
| 667 |
< |
chptr->mode.mode |= mode_type; |
| 667 |
> |
chptr->mode.mode |= d; |
| 668 |
|
|
| 669 |
|
mode_changes[mode_count].letter = c; |
| 670 |
|
mode_changes[mode_count].dir = MODE_ADD; |
| 675 |
|
mode_changes[mode_count].mems = ALL_MEMBERS; |
| 676 |
|
mode_changes[mode_count++].arg = NULL; |
| 677 |
|
} |
| 678 |
< |
else if (dir == MODE_DEL) /* && (chptr->mode.mode & mode_type)) */ |
| 678 |
> |
else if (dir == MODE_DEL) /* && (chptr->mode.mode & d)) */ |
| 679 |
|
{ |
| 680 |
|
/* setting - */ |
| 681 |
|
|
| 682 |
< |
chptr->mode.mode &= ~mode_type; |
| 682 |
> |
chptr->mode.mode &= ~d; |
| 683 |
|
|
| 684 |
|
mode_changes[mode_count].letter = c; |
| 685 |
|
mode_changes[mode_count].dir = MODE_DEL; |
| 694 |
|
static void |
| 695 |
|
chm_ban(struct Client *client_p, struct Client *source_p, |
| 696 |
|
struct Channel *chptr, int parc, int *parn, |
| 697 |
< |
char **parv, int *errors, int alev, int dir, char c, void *d, |
| 706 |
< |
const char *chname) |
| 697 |
> |
char **parv, int *errors, int alev, int dir, char c, unsigned int d) |
| 698 |
|
{ |
| 699 |
|
char *mask = NULL; |
| 700 |
|
|
| 711 |
|
{ |
| 712 |
|
const struct Ban *banptr = ptr->data; |
| 713 |
|
sendto_one(client_p, form_str(RPL_BANLIST), |
| 714 |
< |
me.name, client_p->name, chname, |
| 714 |
> |
me.name, client_p->name, chptr->chname, |
| 715 |
|
banptr->name, banptr->user, banptr->host, |
| 716 |
|
banptr->who, banptr->when); |
| 717 |
|
} |
| 718 |
|
|
| 719 |
|
sendto_one(source_p, form_str(RPL_ENDOFBANLIST), me.name, |
| 720 |
< |
source_p->name, chname); |
| 720 |
> |
source_p->name, chptr->chname); |
| 721 |
|
return; |
| 722 |
|
} |
| 723 |
|
|
| 726 |
|
if (!(*errors & SM_ERR_NOOPS)) |
| 727 |
|
sendto_one(source_p, form_str(alev == CHACCESS_NOTONCHAN ? |
| 728 |
|
ERR_NOTONCHANNEL : ERR_CHANOPRIVSNEEDED), |
| 729 |
< |
me.name, source_p->name, chname); |
| 729 |
> |
me.name, source_p->name, chptr->chname); |
| 730 |
|
*errors |= SM_ERR_NOOPS; |
| 731 |
|
return; |
| 732 |
|
} |
| 768 |
|
static void |
| 769 |
|
chm_except(struct Client *client_p, struct Client *source_p, |
| 770 |
|
struct Channel *chptr, int parc, int *parn, |
| 771 |
< |
char **parv, int *errors, int alev, int dir, char c, void *d, |
| 781 |
< |
const char *chname) |
| 771 |
> |
char **parv, int *errors, int alev, int dir, char c, unsigned int d) |
| 772 |
|
{ |
| 773 |
|
char *mask = NULL; |
| 774 |
|
|
| 777 |
|
if (!(*errors & SM_ERR_NOOPS)) |
| 778 |
|
sendto_one(source_p, form_str(alev == CHACCESS_NOTONCHAN ? |
| 779 |
|
ERR_NOTONCHANNEL : ERR_CHANOPRIVSNEEDED), |
| 780 |
< |
me.name, source_p->name, chname); |
| 780 |
> |
me.name, source_p->name, chptr->chname); |
| 781 |
|
*errors |= SM_ERR_NOOPS; |
| 782 |
|
return; |
| 783 |
|
} |
| 795 |
|
{ |
| 796 |
|
const struct Ban *banptr = ptr->data; |
| 797 |
|
sendto_one(client_p, form_str(RPL_EXCEPTLIST), |
| 798 |
< |
me.name, client_p->name, chname, |
| 798 |
> |
me.name, client_p->name, chptr->chname, |
| 799 |
|
banptr->name, banptr->user, banptr->host, |
| 800 |
|
banptr->who, banptr->when); |
| 801 |
|
} |
| 802 |
|
|
| 803 |
|
sendto_one(source_p, form_str(RPL_ENDOFEXCEPTLIST), me.name, |
| 804 |
< |
source_p->name, chname); |
| 804 |
> |
source_p->name, chptr->chname); |
| 805 |
|
return; |
| 806 |
|
} |
| 807 |
|
|
| 842 |
|
static void |
| 843 |
|
chm_invex(struct Client *client_p, struct Client *source_p, |
| 844 |
|
struct Channel *chptr, int parc, int *parn, |
| 845 |
< |
char **parv, int *errors, int alev, int dir, char c, void *d, |
| 856 |
< |
const char *chname) |
| 845 |
> |
char **parv, int *errors, int alev, int dir, char c, unsigned int d) |
| 846 |
|
{ |
| 847 |
|
char *mask = NULL; |
| 848 |
|
|
| 851 |
|
if (!(*errors & SM_ERR_NOOPS)) |
| 852 |
|
sendto_one(source_p, form_str(alev == CHACCESS_NOTONCHAN ? |
| 853 |
|
ERR_NOTONCHANNEL : ERR_CHANOPRIVSNEEDED), |
| 854 |
< |
me.name, source_p->name, chname); |
| 854 |
> |
me.name, source_p->name, chptr->chname); |
| 855 |
|
*errors |= SM_ERR_NOOPS; |
| 856 |
|
return; |
| 857 |
|
} |
| 869 |
|
{ |
| 870 |
|
const struct Ban *banptr = ptr->data; |
| 871 |
|
sendto_one(client_p, form_str(RPL_INVITELIST), me.name, |
| 872 |
< |
client_p->name, chname, |
| 872 |
> |
client_p->name, chptr->chname, |
| 873 |
|
banptr->name, banptr->user, banptr->host, |
| 874 |
|
banptr->who, banptr->when); |
| 875 |
|
} |
| 876 |
|
|
| 877 |
|
sendto_one(source_p, form_str(RPL_ENDOFINVITELIST), me.name, |
| 878 |
< |
source_p->name, chname); |
| 878 |
> |
source_p->name, chptr->chname); |
| 879 |
|
return; |
| 880 |
|
} |
| 881 |
|
|
| 947 |
|
static void |
| 948 |
|
chm_op(struct Client *client_p, struct Client *source_p, |
| 949 |
|
struct Channel *chptr, int parc, int *parn, |
| 950 |
< |
char **parv, int *errors, int alev, int dir, char c, void *d, |
| 962 |
< |
const char *chname) |
| 950 |
> |
char **parv, int *errors, int alev, int dir, char c, unsigned int d) |
| 951 |
|
{ |
| 952 |
|
const char *opnick = NULL; |
| 953 |
|
struct Client *targ_p; |
| 959 |
|
if (!(*errors & SM_ERR_NOOPS)) |
| 960 |
|
sendto_one(source_p, form_str(alev == CHACCESS_NOTONCHAN ? |
| 961 |
|
ERR_NOTONCHANNEL : ERR_CHANOPRIVSNEEDED), |
| 962 |
< |
me.name, source_p->name, chname); |
| 962 |
> |
me.name, source_p->name, chptr->chname); |
| 963 |
|
*errors |= SM_ERR_NOOPS; |
| 964 |
|
return; |
| 965 |
|
} |
| 977 |
|
if ((member = find_channel_link(targ_p, chptr)) == NULL) |
| 978 |
|
{ |
| 979 |
|
if (!(*errors & SM_ERR_NOTONCHANNEL)) |
| 980 |
< |
sendto_one(source_p, form_str(ERR_USERNOTINCHANNEL), |
| 981 |
< |
me.name, source_p->name, opnick, chname); |
| 980 |
> |
sendto_one(source_p, form_str(ERR_USERNOTINCHANNEL), me.name, |
| 981 |
> |
source_p->name, opnick, chptr->chname); |
| 982 |
|
*errors |= SM_ERR_NOTONCHANNEL; |
| 983 |
|
return; |
| 984 |
|
} |
| 996 |
|
{ |
| 997 |
|
--*parn; |
| 998 |
|
chm_hop(client_p, source_p, chptr, parc, parn, parv, errors, alev, |
| 999 |
< |
dir, c, d, chname); |
| 999 |
> |
dir, c, d); |
| 1000 |
|
} |
| 1001 |
|
#endif |
| 1002 |
|
return; |
| 1039 |
|
static void |
| 1040 |
|
chm_hop(struct Client *client_p, struct Client *source_p, |
| 1041 |
|
struct Channel *chptr, int parc, int *parn, |
| 1042 |
< |
char **parv, int *errors, int alev, int dir, char c, void *d, |
| 1055 |
< |
const char *chname) |
| 1042 |
> |
char **parv, int *errors, int alev, int dir, char c, unsigned int d) |
| 1043 |
|
{ |
| 1044 |
|
const char *opnick = NULL; |
| 1045 |
|
struct Client *targ_p; |
| 1064 |
|
if (!(*errors & SM_ERR_NOOPS)) |
| 1065 |
|
sendto_one(source_p, form_str(alev == CHACCESS_NOTONCHAN ? |
| 1066 |
|
ERR_NOTONCHANNEL : ERR_CHANOPRIVSNEEDED), |
| 1067 |
< |
me.name, source_p->name, chname); |
| 1067 |
> |
me.name, source_p->name, chptr->chname); |
| 1068 |
|
*errors |= SM_ERR_NOOPS; |
| 1069 |
|
return; |
| 1070 |
|
} |
| 1083 |
|
{ |
| 1084 |
|
if (!(*errors & SM_ERR_NOTONCHANNEL)) |
| 1085 |
|
sendto_one(source_p, form_str(ERR_USERNOTINCHANNEL), |
| 1086 |
< |
me.name, source_p->name, opnick, chname); |
| 1086 |
> |
me.name, source_p->name, opnick, chptr->chname); |
| 1087 |
|
*errors |= SM_ERR_NOTONCHANNEL; |
| 1088 |
|
return; |
| 1089 |
|
} |
| 1128 |
|
static void |
| 1129 |
|
chm_voice(struct Client *client_p, struct Client *source_p, |
| 1130 |
|
struct Channel *chptr, int parc, int *parn, |
| 1131 |
< |
char **parv, int *errors, int alev, int dir, char c, void *d, |
| 1145 |
< |
const char *chname) |
| 1131 |
> |
char **parv, int *errors, int alev, int dir, char c, unsigned int d) |
| 1132 |
|
{ |
| 1133 |
|
const char *opnick = NULL; |
| 1134 |
|
struct Client *targ_p; |
| 1139 |
|
if (!(*errors & SM_ERR_NOOPS)) |
| 1140 |
|
sendto_one(source_p, form_str(alev == CHACCESS_NOTONCHAN ? |
| 1141 |
|
ERR_NOTONCHANNEL : ERR_CHANOPRIVSNEEDED), |
| 1142 |
< |
me.name, source_p->name, chname); |
| 1142 |
> |
me.name, source_p->name, chptr->chname); |
| 1143 |
|
*errors |= SM_ERR_NOOPS; |
| 1144 |
|
return; |
| 1145 |
|
} |
| 1158 |
|
{ |
| 1159 |
|
if (!(*errors & SM_ERR_NOTONCHANNEL)) |
| 1160 |
|
sendto_one(source_p, form_str(ERR_USERNOTINCHANNEL), |
| 1161 |
< |
me.name, source_p->name, opnick, chname); |
| 1161 |
> |
me.name, source_p->name, opnick, chptr->chname); |
| 1162 |
|
*errors |= SM_ERR_NOTONCHANNEL; |
| 1163 |
|
return; |
| 1164 |
|
} |
| 1190 |
|
static void |
| 1191 |
|
chm_limit(struct Client *client_p, struct Client *source_p, |
| 1192 |
|
struct Channel *chptr, int parc, int *parn, |
| 1193 |
< |
char **parv, int *errors, int alev, int dir, char c, void *d, |
| 1208 |
< |
const char *chname) |
| 1193 |
> |
char **parv, int *errors, int alev, int dir, char c, unsigned int d) |
| 1194 |
|
{ |
| 1195 |
|
int i, limit; |
| 1196 |
|
char *lstr; |
| 1200 |
|
if (!(*errors & SM_ERR_NOOPS)) |
| 1201 |
|
sendto_one(source_p, form_str(alev == CHACCESS_NOTONCHAN ? |
| 1202 |
|
ERR_NOTONCHANNEL : ERR_CHANOPRIVSNEEDED), |
| 1203 |
< |
me.name, source_p->name, chname); |
| 1203 |
> |
me.name, source_p->name, chptr->chname); |
| 1204 |
|
*errors |= SM_ERR_NOOPS; |
| 1205 |
|
return; |
| 1206 |
|
} |
| 1252 |
|
static void |
| 1253 |
|
chm_key(struct Client *client_p, struct Client *source_p, |
| 1254 |
|
struct Channel *chptr, int parc, int *parn, |
| 1255 |
< |
char **parv, int *errors, int alev, int dir, char c, void *d, |
| 1271 |
< |
const char *chname) |
| 1255 |
> |
char **parv, int *errors, int alev, int dir, char c, unsigned int d) |
| 1256 |
|
{ |
| 1257 |
|
int i; |
| 1258 |
|
char *key; |
| 1262 |
|
if (!(*errors & SM_ERR_NOOPS)) |
| 1263 |
|
sendto_one(source_p, form_str(alev == CHACCESS_NOTONCHAN ? |
| 1264 |
|
ERR_NOTONCHANNEL : ERR_CHANOPRIVSNEEDED), |
| 1265 |
< |
me.name, source_p->name, chname); |
| 1265 |
> |
me.name, source_p->name, chptr->chname); |
| 1266 |
|
*errors |= SM_ERR_NOOPS; |
| 1267 |
|
return; |
| 1268 |
|
} |
| 1320 |
|
|
| 1321 |
|
struct ChannelMode |
| 1322 |
|
{ |
| 1323 |
< |
void (*func) (struct Client *client_p, struct Client *source_p, |
| 1324 |
< |
struct Channel *chptr, int parc, int *parn, char **parv, |
| 1325 |
< |
int *errors, int alev, int dir, char c, void *d, |
| 1326 |
< |
const char *chname); |
| 1343 |
< |
void *d; |
| 1323 |
> |
void (*func)(struct Client *, struct Client *, |
| 1324 |
> |
struct Channel *, int, int *, char **, |
| 1325 |
> |
int *, int, int, char, unsigned int); |
| 1326 |
> |
unsigned int d; |
| 1327 |
|
}; |
| 1328 |
|
|
| 1329 |
|
static struct ChannelMode ModeTable[255] = |
| 1330 |
|
{ |
| 1331 |
< |
{chm_nosuch, NULL}, |
| 1332 |
< |
{chm_nosuch, NULL}, /* A */ |
| 1333 |
< |
{chm_nosuch, NULL}, /* B */ |
| 1334 |
< |
{chm_nosuch, NULL}, /* C */ |
| 1335 |
< |
{chm_nosuch, NULL}, /* D */ |
| 1336 |
< |
{chm_nosuch, NULL}, /* E */ |
| 1337 |
< |
{chm_nosuch, NULL}, /* F */ |
| 1338 |
< |
{chm_nosuch, NULL}, /* G */ |
| 1339 |
< |
{chm_nosuch, NULL}, /* H */ |
| 1340 |
< |
{chm_invex, NULL}, /* I */ |
| 1341 |
< |
{chm_nosuch, NULL}, /* J */ |
| 1342 |
< |
{chm_nosuch, NULL}, /* K */ |
| 1343 |
< |
{chm_nosuch, NULL}, /* L */ |
| 1344 |
< |
{chm_simple, (void *)MODE_MODREG}, /* M */ |
| 1345 |
< |
{chm_nosuch, NULL}, /* N */ |
| 1346 |
< |
{chm_operonly, (void *) MODE_OPERONLY}, /* O */ |
| 1347 |
< |
{chm_nosuch, NULL}, /* P */ |
| 1348 |
< |
{chm_nosuch, NULL}, /* Q */ |
| 1349 |
< |
{chm_simple, (void *) MODE_REGONLY}, /* R */ |
| 1350 |
< |
{chm_simple, (void *) MODE_SSLONLY}, /* S */ |
| 1351 |
< |
{chm_nosuch, NULL}, /* T */ |
| 1352 |
< |
{chm_nosuch, NULL}, /* U */ |
| 1353 |
< |
{chm_nosuch, NULL}, /* V */ |
| 1354 |
< |
{chm_nosuch, NULL}, /* W */ |
| 1355 |
< |
{chm_nosuch, NULL}, /* X */ |
| 1356 |
< |
{chm_nosuch, NULL}, /* Y */ |
| 1357 |
< |
{chm_nosuch, NULL}, /* Z */ |
| 1358 |
< |
{chm_nosuch, NULL}, |
| 1359 |
< |
{chm_nosuch, NULL}, |
| 1360 |
< |
{chm_nosuch, NULL}, |
| 1361 |
< |
{chm_nosuch, NULL}, |
| 1362 |
< |
{chm_nosuch, NULL}, |
| 1363 |
< |
{chm_nosuch, NULL}, |
| 1364 |
< |
{chm_nosuch, NULL}, /* a */ |
| 1365 |
< |
{chm_ban, NULL}, /* b */ |
| 1366 |
< |
{chm_simple, (void *) MODE_NOCTRL}, /* c */ |
| 1367 |
< |
{chm_nosuch, NULL}, /* d */ |
| 1368 |
< |
{chm_except, NULL}, /* e */ |
| 1369 |
< |
{chm_nosuch, NULL}, /* f */ |
| 1370 |
< |
{chm_nosuch, NULL}, /* g */ |
| 1331 |
> |
{chm_nosuch, 0}, |
| 1332 |
> |
{chm_nosuch, 0}, /* A */ |
| 1333 |
> |
{chm_nosuch, 0}, /* B */ |
| 1334 |
> |
{chm_nosuch, 0}, /* C */ |
| 1335 |
> |
{chm_nosuch, 0}, /* D */ |
| 1336 |
> |
{chm_nosuch, 0}, /* E */ |
| 1337 |
> |
{chm_nosuch, 0}, /* F */ |
| 1338 |
> |
{chm_nosuch, 0}, /* G */ |
| 1339 |
> |
{chm_nosuch, 0}, /* H */ |
| 1340 |
> |
{chm_invex, 0}, /* I */ |
| 1341 |
> |
{chm_nosuch, 0}, /* J */ |
| 1342 |
> |
{chm_nosuch, 0}, /* K */ |
| 1343 |
> |
{chm_nosuch, 0}, /* L */ |
| 1344 |
> |
{chm_simple, MODE_MODREG}, /* M */ |
| 1345 |
> |
{chm_nosuch, 0}, /* N */ |
| 1346 |
> |
{chm_operonly, MODE_OPERONLY}, /* O */ |
| 1347 |
> |
{chm_nosuch, 0}, /* P */ |
| 1348 |
> |
{chm_nosuch, 0}, /* Q */ |
| 1349 |
> |
{chm_simple, MODE_REGONLY}, /* R */ |
| 1350 |
> |
{chm_simple, MODE_SSLONLY}, /* S */ |
| 1351 |
> |
{chm_nosuch, 0}, /* T */ |
| 1352 |
> |
{chm_nosuch, 0}, /* U */ |
| 1353 |
> |
{chm_nosuch, 0}, /* V */ |
| 1354 |
> |
{chm_nosuch, 0}, /* W */ |
| 1355 |
> |
{chm_nosuch, 0}, /* X */ |
| 1356 |
> |
{chm_nosuch, 0}, /* Y */ |
| 1357 |
> |
{chm_nosuch, 0}, /* Z */ |
| 1358 |
> |
{chm_nosuch, 0}, |
| 1359 |
> |
{chm_nosuch, 0}, |
| 1360 |
> |
{chm_nosuch, 0}, |
| 1361 |
> |
{chm_nosuch, 0}, |
| 1362 |
> |
{chm_nosuch, 0}, |
| 1363 |
> |
{chm_nosuch, 0}, |
| 1364 |
> |
{chm_nosuch, 0}, /* a */ |
| 1365 |
> |
{chm_ban, 0}, /* b */ |
| 1366 |
> |
{chm_simple, MODE_NOCTRL}, /* c */ |
| 1367 |
> |
{chm_nosuch, 0}, /* d */ |
| 1368 |
> |
{chm_except, 0}, /* e */ |
| 1369 |
> |
{chm_nosuch, 0}, /* f */ |
| 1370 |
> |
{chm_nosuch, 0}, /* g */ |
| 1371 |
|
#ifdef HALFOPS |
| 1372 |
< |
{chm_hop, NULL}, /* h */ |
| 1372 |
> |
{chm_hop, 0}, /* h */ |
| 1373 |
|
#else |
| 1374 |
< |
{chm_nosuch, NULL}, /* h */ |
| 1374 |
> |
{chm_nosuch, 0}, /* h */ |
| 1375 |
|
#endif |
| 1376 |
< |
{chm_simple, (void *) MODE_INVITEONLY}, /* i */ |
| 1377 |
< |
{chm_nosuch, NULL}, /* j */ |
| 1378 |
< |
{chm_key, NULL}, /* k */ |
| 1379 |
< |
{chm_limit, NULL}, /* l */ |
| 1380 |
< |
{chm_simple, (void *) MODE_MODERATED}, /* m */ |
| 1381 |
< |
{chm_simple, (void *) MODE_NOPRIVMSGS}, /* n */ |
| 1382 |
< |
{chm_op, NULL}, /* o */ |
| 1383 |
< |
{chm_simple, (void *) MODE_PRIVATE}, /* p */ |
| 1384 |
< |
{chm_nosuch, NULL}, /* q */ |
| 1385 |
< |
{chm_registered, (void *) MODE_REGISTERED}, /* r */ |
| 1386 |
< |
{chm_simple, (void *) MODE_SECRET}, /* s */ |
| 1387 |
< |
{chm_simple, (void *) MODE_TOPICLIMIT}, /* t */ |
| 1388 |
< |
{chm_nosuch, NULL}, /* u */ |
| 1389 |
< |
{chm_voice, NULL}, /* v */ |
| 1390 |
< |
{chm_nosuch, NULL}, /* w */ |
| 1391 |
< |
{chm_nosuch, NULL}, /* x */ |
| 1392 |
< |
{chm_nosuch, NULL}, /* y */ |
| 1393 |
< |
{chm_nosuch, NULL}, /* z */ |
| 1376 |
> |
{chm_simple, MODE_INVITEONLY}, /* i */ |
| 1377 |
> |
{chm_nosuch, 0}, /* j */ |
| 1378 |
> |
{chm_key, 0}, /* k */ |
| 1379 |
> |
{chm_limit, 0}, /* l */ |
| 1380 |
> |
{chm_simple, MODE_MODERATED}, /* m */ |
| 1381 |
> |
{chm_simple, MODE_NOPRIVMSGS}, /* n */ |
| 1382 |
> |
{chm_op, 0}, /* o */ |
| 1383 |
> |
{chm_simple, MODE_PRIVATE}, /* p */ |
| 1384 |
> |
{chm_nosuch, 0}, /* q */ |
| 1385 |
> |
{chm_registered, MODE_REGISTERED}, /* r */ |
| 1386 |
> |
{chm_simple, MODE_SECRET}, /* s */ |
| 1387 |
> |
{chm_simple, MODE_TOPICLIMIT}, /* t */ |
| 1388 |
> |
{chm_nosuch, 0}, /* u */ |
| 1389 |
> |
{chm_voice, 0}, /* v */ |
| 1390 |
> |
{chm_nosuch, 0}, /* w */ |
| 1391 |
> |
{chm_nosuch, 0}, /* x */ |
| 1392 |
> |
{chm_nosuch, 0}, /* y */ |
| 1393 |
> |
{chm_nosuch, 0}, /* z */ |
| 1394 |
|
}; |
| 1395 |
|
|
| 1396 |
|
/* get_channel_access() |
| 1562 |
|
/* ensure parabuf < MODEBUFLEN -db */ |
| 1563 |
|
static void |
| 1564 |
|
send_mode_changes(struct Client *client_p, struct Client *source_p, |
| 1565 |
< |
struct Channel *chptr, char *chname) |
| 1565 |
> |
struct Channel *chptr) |
| 1566 |
|
{ |
| 1567 |
|
int i, mbl, pbl, arglen, nc, mc; |
| 1568 |
|
int len; |
| 1577 |
|
if (IsServer(source_p)) |
| 1578 |
|
mbl = sprintf(modebuf, ":%s MODE %s ", (IsHidden(source_p) || |
| 1579 |
|
ConfigServerHide.hide_servers) ? |
| 1580 |
< |
me.name : source_p->name, chname); |
| 1580 |
> |
me.name : source_p->name, chptr->chname); |
| 1581 |
|
else |
| 1582 |
|
mbl = sprintf(modebuf, ":%s!%s@%s MODE %s ", source_p->name, |
| 1583 |
< |
source_p->username, source_p->host, chname); |
| 1583 |
> |
source_p->username, source_p->host, chptr->chname); |
| 1584 |
|
|
| 1585 |
|
mc = 0; |
| 1586 |
|
nc = 0; |
| 1618 |
|
if (IsServer(source_p)) |
| 1619 |
|
mbl = sprintf(modebuf, ":%s MODE %s ", (IsHidden(source_p) || |
| 1620 |
|
ConfigServerHide.hide_servers) ? |
| 1621 |
< |
me.name : source_p->name, chname); |
| 1621 |
> |
me.name : source_p->name, chptr->chname); |
| 1622 |
|
else |
| 1623 |
|
mbl = sprintf(modebuf, ":%s!%s@%s MODE %s ", source_p->name, |
| 1624 |
< |
source_p->username, source_p->host, chname); |
| 1624 |
> |
source_p->username, source_p->host, chptr->chname); |
| 1625 |
|
|
| 1626 |
|
pbl = 0; |
| 1627 |
|
parabuf[0] = '\0'; |
| 1678 |
|
*/ |
| 1679 |
|
void |
| 1680 |
|
set_channel_mode(struct Client *client_p, struct Client *source_p, struct Channel *chptr, |
| 1681 |
< |
struct Membership *member, int parc, char *parv[], char *chname) |
| 1681 |
> |
struct Membership *member, int parc, char *parv[]) |
| 1682 |
|
{ |
| 1683 |
|
int dir = MODE_ADD; |
| 1684 |
|
int parn = 1; |
| 1713 |
|
ModeTable[table_position].func(client_p, source_p, chptr, |
| 1714 |
|
parc, &parn, |
| 1715 |
|
parv, &errors, alevel, dir, c, |
| 1716 |
< |
ModeTable[table_position].d, |
| 1734 |
< |
chname); |
| 1716 |
> |
ModeTable[table_position].d); |
| 1717 |
|
break; |
| 1718 |
|
} |
| 1719 |
|
} |
| 1720 |
|
|
| 1721 |
< |
send_mode_changes(client_p, source_p, chptr, chname); |
| 1721 |
> |
send_mode_changes(client_p, source_p, chptr); |
| 1722 |
|
} |