From: michael Date: Thu, 25 Dec 2014 16:04:40 +0000 (+0000) Subject: - Style corrections X-Git-Tag: 1.0.0beta1~18 X-Git-Url: http://git.serene-ircd.net/?a=commitdiff_plain;h=8f0d5b22c3baa06d40f238b66dd4e01e9706ddff;p=hopm.git - Style corrections git-svn-id: svn://svn.ircd-hybrid.org/svnroot/hopm/trunk@5120 82007160-df01-0410-b94d-b575c5fd34c7 --- diff --git a/src/config.h b/src/config.h index dbac8e3..33335e6 100644 --- a/src/config.h +++ b/src/config.h @@ -12,110 +12,99 @@ extern void yyerror(const char *); extern void config_load(const char *); -/* structs to hold data */ - struct IRCConf { - char *nick; - char *username; - char *realname; - - char *server; - int port; - char *password; - - char *vhost; - - char *nickserv; - char *oper; - char *mode; - char *away; - - char *connregex; - char *kline; - - list_t *channels; /* List of ChannelConf */ - list_t *performs; /* List of char * */ + char *nick; + char *username; + char *realname; + char *server; + int port; + char *password; + char *vhost; + char *nickserv; + char *oper; + char *mode; + char *away; + char *connregex; + char *kline; + list_t *channels; /* List of ChannelConf */ + list_t *performs; /* List of char * */ }; struct ChannelConf { - char *name; - char *key; - char *invite; + char *name; + char *key; + char *invite; }; struct OptionsConf { - int negcache; - unsigned int dns_fdlimit; - char *pidfile; - char *scanlog; + int negcache; + unsigned int dns_fdlimit; + char *pidfile; + char *scanlog; }; struct UserConf { - list_t *masks; /* List of char * */ - list_t *scanners; /* List of char * */ + list_t *masks; /* List of char * */ + list_t *scanners; /* List of char * */ }; struct ScannerConf { - char *name; - - list_t *protocols; - char *vhost; - - int fd; - - char *target_ip; - int target_port; - - int timeout; - int max_read; - - list_t *target_string; - int target_string_created; + char *name; + list_t *protocols; + char *vhost; + int fd; + char *target_ip; + int target_port; + int timeout; + int max_read; + list_t *target_string; + int target_string_created; }; struct ProtocolConf { - int type; - unsigned int port; + int type; + unsigned int port; }; struct OpmConf { - list_t *blacklists; - char *dnsbl_from; - char *dnsbl_to; - char *sendmail; + list_t *blacklists; + char *dnsbl_from; + char *dnsbl_to; + char *sendmail; }; -enum BlacklistType { +enum BlacklistType +{ A_BITMASK = 1, A_REPLY }; struct BlacklistConf { - char *name; - char *kline; - enum BlacklistType type; - int ban_unknown; - list_t *reply; - unsigned int stats_recv; + char *name; + char *kline; + enum BlacklistType type; + int ban_unknown; + list_t *reply; + unsigned int stats_recv; }; struct BlacklistReplyConf { - char number; - char *type; + char number; + char *type; }; struct ExemptConf { - list_t *masks; + list_t *masks; }; diff --git a/src/dnsbl.h b/src/dnsbl.h index 6a3f307..135f7ca 100644 --- a/src/dnsbl.h +++ b/src/dnsbl.h @@ -4,15 +4,15 @@ #include "firedns.h" #include "scan.h" -extern void dnsbl_add(struct scan_struct *); -extern void dnsbl_result(struct firedns_result *); -extern void dnsbl_cycle(void); -extern void dnsbl_report(struct scan_struct *ss); - -struct dnsbl_scan { - struct scan_struct *ss; - struct BlacklistConf *bl; +struct dnsbl_scan +{ + struct scan_struct *ss; + struct BlacklistConf *bl; }; +extern void dnsbl_add(struct scan_struct *); +extern void dnsbl_result(struct firedns_result *); +extern void dnsbl_cycle(void); +extern void dnsbl_report(struct scan_struct *); #endif diff --git a/src/irc.h b/src/irc.h index 1b9a04c..a65b353 100644 --- a/src/irc.h +++ b/src/irc.h @@ -8,32 +8,29 @@ struct bopm_sockaddr { - struct sockaddr_in sa4; + struct sockaddr_in sa4; }; - struct bopm_ircaddr { - struct in_addr in4; + struct in_addr in4; }; - struct UserInfo { - char *irc_nick; - char *irc_username; - char *irc_hostname; + char *irc_nick; + char *irc_username; + char *irc_hostname; }; typedef void (*irc_command) (char **, unsigned int, char *, struct UserInfo *); struct CommandHash { - const char *command; - irc_command handler; + const char *command; + irc_command handler; }; - extern void irc_send(const char *, ...); extern void irc_send_channels(const char *, ...); extern void irc_cycle(void); diff --git a/src/log.h b/src/log.h index da04cb7..d450375 100644 --- a/src/log.h +++ b/src/log.h @@ -1,15 +1,13 @@ #ifndef LOG_H #define LOG_H -extern void log_open(char *filename); +extern void log_open(char *); extern void log_close(void); -extern void scanlog_open(char *filename); +extern void scanlog_open(char *); extern void scanlog_close(void); #ifdef __GNUC__ extern void log_printf(const char *data, ...) __attribute__((format(printf,1,2))); #else extern void log_printf(const char *data, ...); #endif - #endif - diff --git a/src/main.h b/src/main.h index ad6bb8b..b6489b5 100644 --- a/src/main.h +++ b/src/main.h @@ -2,5 +2,4 @@ #define MAIN_H extern void main_restart(void); - #endif /* MAIN_H */ diff --git a/src/misc.h b/src/misc.h index baac9d5..144aff6 100644 --- a/src/misc.h +++ b/src/misc.h @@ -3,5 +3,4 @@ extern char *dissect_time(time_t); extern char *clean(char *); - #endif diff --git a/src/negcache.h b/src/negcache.h index 66a0311..d1e227b 100644 --- a/src/negcache.h +++ b/src/negcache.h @@ -3,16 +3,15 @@ struct cnode { - unsigned long ip; /* IP address, network byte order. */ - time_t seen; /* When it was last seen. */ - unsigned int b; /* Index of bit to be tested. */ - struct cnode *l; /* Node to the left. */ - struct cnode *r; /* Node to the right. */ + unsigned long ip; /* IP address, network byte order. */ + time_t seen; /* When it was last seen. */ + unsigned int b; /* Index of bit to be tested. */ + struct cnode *l; /* Node to the left. */ + struct cnode *r; /* Node to the right. */ }; extern void nc_init(struct cnode **); extern struct cnode *check_neg_cache(const unsigned long); extern void negcache_insert(const char *); extern void negcache_rebuild(void); - #endif diff --git a/src/opercmd.h b/src/opercmd.h index af6376a..c04eee0 100644 --- a/src/opercmd.h +++ b/src/opercmd.h @@ -5,39 +5,38 @@ struct Command { - /* Index of command in COMMAND_TABLE in opercmd.c */ - unsigned short type; - - /* Command parameter. - * but i cant think of any commands bopm will ever have that is - * multiple parameters - * - * I still havn't -Erik 12/11/02 - */ - char *param; - - /* Who ordered it. */ - char *irc_nick; - - /* Where the reply is to be sent. */ - struct ChannelConf *target; - - /* - * When it was added, because we might need to remove it if it does - * not get executed. - */ - time_t added; + /* Index of command in COMMAND_TABLE in opercmd.c */ + unsigned short type; + + /* Command parameter. + * but i cant think of any commands bopm will ever have that is + * multiple parameters + * + * I still havn't -Erik 12/11/02 + */ + char *param; + + /* Who ordered it. */ + char *irc_nick; + + /* Where the reply is to be sent. */ + struct ChannelConf *target; + + /* + * When it was added, because we might need to remove it if it does + * not get executed. + */ + time_t added; }; struct OperCommandHash { - const char *command; - void (*handler)(char *, char*, struct ChannelConf *); + const char *command; + void (*handler)(char *, char*, struct ChannelConf *); }; extern void command_init(void); extern void command_userhost(char *); extern void command_timer(void); -extern void command_parse(char *, char *, struct ChannelConf *, - struct UserInfo *); +extern void command_parse(char *, char *, struct ChannelConf *, struct UserInfo *); #endif diff --git a/src/scan.h b/src/scan.h index 173d1ec..e7c378b 100644 --- a/src/scan.h +++ b/src/scan.h @@ -5,32 +5,32 @@ struct scan_struct { - char *irc_nick; - char *irc_username; - char *irc_hostname; + char *irc_nick; + char *irc_username; + char *irc_hostname; - char *ip; - char *proof; - OPM_REMOTE_T *remote; + char *ip; + char *proof; + OPM_REMOTE_T *remote; - unsigned int scans; - unsigned int positive; + unsigned int scans; + unsigned int positive; - struct ChannelConf *manual_target; + struct ChannelConf *manual_target; }; struct scanner_struct { - char *name; - OPM_T *scanner; - list_t *masks; + char *name; + OPM_T *scanner; + list_t *masks; }; struct protocol_assoc { - int type; - const char *name; + int type; + const char *name; }; extern void scan_init(void); @@ -45,9 +45,9 @@ extern void scan_positive(struct scan_struct *, const char *, const char *); struct kline_format_assoc { - char key; - const void *data; - int type; + char key; + const void *data; + int type; }; #define FORMATTYPE_STRING 1 diff --git a/src/stats.h b/src/stats.h index e53753d..6483c84 100644 --- a/src/stats.h +++ b/src/stats.h @@ -6,9 +6,9 @@ struct StatsHash { - int type; - unsigned int count; - const char *name; + int type; + unsigned int count; + const char *name; }; extern void stats_init(void); @@ -17,7 +17,6 @@ extern void stats_connect(void); extern void stats_dnsblrecv(struct BlacklistConf *); extern void stats_dnsblsend(void); extern void stats_output(char *); - extern void fdstats_output(char *); #endif /* STATS_H */