src/chanserv.c (zoot_list): Delete this function.
(cmd_invite): Remove never-read uData variable.
(ban_read_helper): Remove never-read bData variable.
src/helpfile.c (vsend_message): Remove never-read expand_pos variable.
src/ioset.c (ioset_buffered_read): Remove never-read fdnum variable.
src/log.c (log_entry_search): Remove never-read last variable.
src/mod-helpserv.c (cmd_add_user): Remove never-read new_user variable.
src/modcmd.c (check_alias_args): Remove never-read tmp variable.
src/nickserv.c (cmd_reclaim): Remove never-read hi variable.
src/proto-p10.c (cmd_topic): Remove never-read chan_ts variable.
(AddLocalUser): Remove never-read timestamp variable.
return 1;
}
-static void
-zoot_list(struct listData *list)
-{
- struct userData *uData;
- unsigned int start, curr, highest, lowest;
- struct helpfile_table tmp_table;
- const char **temp, *msg;
-
- if(list->table.length == 1)
- {
- if(list->search)
- send_message(list->user, list->bot, "CSMSG_ACCESS_SEARCH_HEADER", list->channel->name, list->lowest, list->highest, list->search);
- else
- send_message(list->user, list->bot, "CSMSG_ACCESS_ALL_HEADER", list->channel->name, list->lowest, list->highest);
- msg = user_find_message(list->user, "MSG_NONE");
- send_message_type(4, list->user, list->bot, " %s", msg);
- }
- tmp_table.width = list->table.width;
- tmp_table.flags = list->table.flags;
- list->table.contents[0][0] = " ";
- highest = list->highest;
- if(list->lowest != 0)
- lowest = list->lowest;
- else if(highest < 100)
- lowest = 1;
- else
- lowest = highest - 100;
- for(start = curr = 1; curr < list->table.length; )
- {
- uData = list->users[curr-1];
- list->table.contents[curr++][0] = " ";
- if((curr == list->table.length) || (list->users[curr-1]->access < lowest))
- {
- if(list->search)
- send_message(list->user, list->bot, "CSMSG_ACCESS_SEARCH_HEADER", list->channel->name, lowest, highest, list->search);
- else
- send_message(list->user, list->bot, "CSMSG_ACCESS_ALL_HEADER", list->channel->name, lowest, highest);
- temp = list->table.contents[--start];
- list->table.contents[start] = list->table.contents[0];
- tmp_table.contents = list->table.contents + start;
- tmp_table.length = curr - start;
- table_send(list->bot, list->user->nick, 0, NULL, tmp_table);
- list->table.contents[start] = temp;
- start = curr;
- highest = lowest - 1;
- lowest = (highest < 100) ? 0 : (highest - 99);
- }
- }
-}
-
static void
def_list(struct listData *list)
{
lData.highest = highest;
lData.search = (argc > 1) ? argv[1] : NULL;
send_list = def_list;
- (void)zoot_list; /* since it doesn't show user levels */
if(user->handle_info)
{
static CHANSERV_FUNC(cmd_invite)
{
- struct userData *uData;
struct userNode *invite;
- uData = GetChannelUser(channel->channel_info, user->handle_info);
-
if(argc > 1)
{
if(!(invite = GetUserH(argv[1])))
static void
ban_read_helper(const char *key, struct record_data *rd, struct chanData *chan)
{
- struct banData *bData;
char *set, *triggered, *s_duration, *s_expires, *reason, *owner;
unsigned long set_time, triggered_time, expires_time;
if(!reason || (expires_time && (expires_time < now)))
return;
- bData = add_channel_ban(chan, key, owner, set_time, triggered_time, expires_time, reason);
+ add_channel_ban(chan, key, owner, set_time, triggered_time, expires_time, reason);
}
static struct suspended *
void (*irc_send)(struct userNode *from, const char *to, const char *msg);
static struct string_buffer input;
unsigned int size, ipos, pos, length, chars_sent, use_color;
- unsigned int expand_pos, expand_ipos, newline_ipos;
+ unsigned int expand_ipos, newline_ipos;
char line[MAX_LINE_SIZE];
if (IsChannelName(dest) || *dest == '$') {
* that requires a very big intermediate buffer.
*/
expand_ipos = newline_ipos = ipos = 0;
- expand_pos = pos = 0;
+ pos = 0;
chars_sent = 0;
while (input.list[ipos]) {
char ch, *value, *free_value;
free(free_value);
pos += length;
if ((pos < size-1) && input.list[ipos]) {
- expand_pos = pos;
expand_ipos = ipos;
continue;
}
send_line:
- expand_pos = pos;
expand_ipos = ipos;
SEND_LINE(0);
#undef SEND_LINE
static void
ioset_buffered_read(struct io_fd *fd) {
- int put_avail, nbr, fdnum;
+ int put_avail, nbr;
if (!(put_avail = ioq_put_avail(&fd->recv)))
put_avail = ioq_grow(&fd->recv);
fd->recv.put += nbr;
if (fd->recv.put == fd->recv.size)
fd->recv.put = 0;
- fdnum = fd->fd;
while (fd->line_len > 0) {
struct io_fd *old_active;
int died = 0;
unsigned int matched = 0;
if (discrim->type) {
- static volatile struct logEntry *last;
struct logEntry *entry;
- for (entry = discrim->type->log_oldest, last = NULL;
+ for (entry = discrim->type->log_oldest;
entry;
- last = entry, entry = entry->next) {
+ entry = entry->next) {
verify(entry);
if (entry_match(discrim, entry)) {
esf(entry, data);
}
static int cmd_add_user(struct helpserv_bot *hs, int from_opserv, struct userNode *user, enum helpserv_level level, int argc, char *argv[]) {
- struct helpserv_user *actor, *new_user;
+ struct helpserv_user *actor;
struct handle_info *handle;
REQUIRE_PARMS(2);
return 0;
}
- new_user = helpserv_add_user(hs, handle, level);
+ helpserv_add_user(hs, handle, level);
helpserv_notice(user, "HSMSG_ADDED_USER", helpserv_level2str(level), handle->handle);
return 1;
continue;
} else if (isdigit(argv[arg][1])) {
char *end_num;
- unsigned long tmp;
- tmp = strtoul(argv[arg]+1, &end_num, 10);
+ (void)strtoul(argv[arg]+1, &end_num, 10);
switch (end_num[0]) {
case 0:
continue;
static NICKSERV_FUNC(cmd_reclaim)
{
- struct handle_info *hi;
struct nick_info *ni;
struct userNode *victim;
NICKSERV_MIN_PARMS(2);
- hi = user->handle_info;
ni = dict_find(nickserv_nick_dict, argv[1], 0);
if (!ni) {
reply("NSMSG_UNKNOWN_NICK", argv[1]);
static CMD_FUNC(cmd_topic)
{
struct chanNode *cn;
- unsigned long chan_ts, topic_ts;
+ unsigned long topic_ts;
if (argc < 3)
return 0;
}
if (argc >= 5) {
/* Looks like an Asuka style topic burst. */
- chan_ts = atoi(argv[2]);
topic_ts = atoi(argv[3]);
} else {
- chan_ts = cn->timestamp;
topic_ts = now;
}
SetChannelTopic(cn, GetUserH(origin), argv[argc-1], 0);
{
char numeric[COMBO_NUMERIC_LEN+1];
int local_num = get_local_numeric();
- unsigned long timestamp = now;
struct userNode *old_user = GetUserH(nick);
if (!modes)
if (old_user) {
if (IsLocal(old_user))
return old_user;
- timestamp = old_user->timestamp - 1;
}
if (local_num == -1) {
log_module(MAIN_LOG, LOG_ERROR, "Unable to allocate numnick for service %s", nick);