Commit f4874663 authored by Andrew Price's avatar Andrew Price
Browse files

Remove some unused functions

parent d725e0a5
Loading
Loading
Loading
Loading
+0 −21
Original line number Diff line number Diff line
@@ -30,27 +30,6 @@ extern struct person *user;
extern struct room myroom;
extern long userposn;

/* called only by cmdline flags */
void what_list(void) {
	struct person	u;
	int		ufile;
	time_t		t;
	char *		timestr;
	
	ufile=userdb_open(O_RDONLY);
	if (ufile < 0) return; /* whoops */
	
	while (read(ufile, &u, sizeof(u))) {
		if (! u_del(u.status)) {
			t = (time_t) u.dowhen;
			timestr = ctime(&t);
			timestr[strlen(timestr) - 1] = 0;	// Strip the \n
			if (u.dowhen && u.doing[0] != 0) printf("%s | %s %s (%s ago)\n", timestr, u.name, u.doing, itime(time(0)-u.dowhen));
		}
	}
	close(ufile);
}

char *itime(unsigned long t)
{
	static char out[7];
+0 −1
Original line number Diff line number Diff line
@@ -8,7 +8,6 @@ void check_copies(int32_t where);
char *itime(unsigned long t);
void display_wholist(int type);
void update_wholist(ipc_message_t *msg);
void what_list(void);
char *part_who_talk(const char *text, int status);
char *part_who(const char *text, int status);
json_t * grab_wholist(void);
+0 −6
Original line number Diff line number Diff line
@@ -442,12 +442,6 @@ int gag_code(const char *str)
	return(0);
}

const char *ungag_name(unsigned long chatmode)
{
	int gnum = (chatmode & CM_GAGMASK) >> CM_GAGSHIFT;
	return gag_type(gnum);
}

/***************************************************************
 * the gag filters
 */
+0 −1
Original line number Diff line number Diff line
@@ -22,6 +22,5 @@ char * apply_gag(struct person *speaker, const char *text);
GagInfo *gag_find(int num);
int gag_code(const char *str);
const char *gag_type(int type);
const char *ungag_name(unsigned long chatmode);

#endif /* GAGS_H */
+0 −19
Original line number Diff line number Diff line
@@ -509,25 +509,6 @@ void msg_attach_to_all(ipc_message_t *msg)
	close(users_fd);
}

/* send copy to specific session/connection by PID */
void msg_attach_to_pid(ipc_message_t *msg, uint32_t pid)
{
	struct list_head *pos;
	list_for_each(pos, &connection_list) {
		ipc_connection_t *c = list_entry(pos, ipc_connection_t, list);
		if (c->state == IPCSTATE_VALID) {
			if (pid == 0) {
				/* broadcast */
				msg_attach(msg, c);
			} else
			if (pid == c->addr) {
				/* unicast */
				msg_attach(msg, c);
			}
		}
	}
}

/* send msg to all sessions of user idetified by userid/posn */
int msg_attach_to_userid(ipc_message_t *msg, uint32_t userposn)
{
Loading