Changes in irc.h [1aa74f55:2dcaf9a]
Legend:
- Unmodified
- Added
- Removed
-
irc.h
r1aa74f55 r2dcaf9a 28 28 29 29 #define IRC_MAX_LINE 512 30 #define IRC_MAX_ARGS 830 #define IRC_MAX_ARGS 16 31 31 32 32 #define IRC_LOGIN_TIMEOUT 60 … … 86 86 gint login_source_id; /* To slightly delay some events at login time. */ 87 87 88 struct otr *otr; /* OTR state and book keeping, used by the OTR plugin. 89 TODO: Some mechanism for plugindata. */ 90 88 91 struct bee *b; 89 92 } irc_t; … … 93 96 /* Replaced with iu->last_channel IRC_USER_PRIVATE = 1, */ 94 97 IRC_USER_AWAY = 2, 98 99 IRC_USER_OTR_ENCRYPTED = 0x10000, 100 IRC_USER_OTR_TRUSTED = 0x20000, 95 101 } irc_user_flags_t; 96 102 … … 214 220 } irc_channel_del_user_type_t; 215 221 222 /* These are a glued a little bit to the core/bee layer and a little bit to 223 IRC. The first user is OTR, and I guess at some point we'll get to shape 224 this a little bit more as other uses come up. */ 225 typedef struct irc_plugin 226 { 227 /* Called at the end of irc_new(). Can be used to add settings, etc. */ 228 gboolean (*irc_new)( irc_t *irc ); 229 /* At the end of irc_free(). */ 230 void (*irc_free)( irc_t *irc ); 231 232 /* Problem with the following two functions is ordering if multiple 233 plugins are handling them. Let's keep fixing that problem for 234 whenever it becomes important. */ 235 236 /* Called by bee_irc_user_privmsg_cb(). Return NULL if you want to 237 abort sending the msg. */ 238 char* (*filter_msg_out)( irc_user_t *iu, char *msg, int flags ); 239 /* Called by bee_irc_user_msg(). Return NULL if you swallowed the 240 message and don't want anything to go to the user. */ 241 char* (*filter_msg_in)( irc_user_t *iu, char *msg, int flags ); 242 243 /* From storage.c functions. Ideally these should not be used 244 and instead data should be stored in settings which will get 245 saved automatically. Consider these deprecated! */ 246 void (*storage_load)( irc_t *irc ); 247 void (*storage_save)( irc_t *irc ); 248 void (*storage_remove)( const char *nick ); 249 } irc_plugin_t; 250 251 extern GSList *irc_plugins; /* struct irc_plugin */ 252 216 253 /* irc.c */ 217 254 extern GSList *irc_connection_list; … … 238 275 239 276 void irc_umode_set( irc_t *irc, const char *s, gboolean allow_priv ); 277 278 void register_irc_plugin( const struct irc_plugin *p ); 240 279 241 280 /* irc_channel.c */
Note: See TracChangeset
for help on using the changeset viewer.