- Globalny cmd_desc (const char *name, const char **params, session_t *session, const char *target, int quiet)
Think about it. think, think, think. Maybe let's use queries for it?
Check if session_unidle() is needed.
- Globalny cmd_plugin (const char *name, const char **params, session_t *session, const char *target, int quiet)
- see XXX's
- Globalny config_upgrade ()
- Instead of hardcoded dates, use strftime() because for instance in USA we have got month and date reversed.
- Globalny config_upgrade ()
- Instead of hardcoded dates, use strftime() because for instance in USA we have got month and date reversed.
- Globalny ekg2_dlopen (const char *name)
- Think more about flags for dlopen() [was: RTLD_LAZY | RTLD_GLOBAL]
- Globalny format_add (const char *name, const char *value, int replace)
- What about creating global variable: formats_unique_here.. and if set to 1, don't search if this format already exists? It should speedup theme_init() a little.
- Globalny format_remove (const char *name)
- We can speedup it a little, by passing to list_remove() ptr to previous item.. senseless?
- Globalny fstring_free (fstring_t *str)
- XXX Think about freeing str->priv_data
- Globalny gg_add_notify_handle (void *data, va_list ap)
- We ignore gg_add_notify_ex() result
- Globalny gg_command_block (const char *name, const char **params, session_t *session, const char *target, int quiet)
- Think about config_changed ... maybe let's create userlist_changed for this or smth?
- Globalny gg_command_passwd (const char *name, const char **params, session_t *session, const char *target, int quiet)
- Add support for really old libgadu functions? like: gg_change_passwd2() ?
- Globalny gg_command_unblock (const char *name, const char **params, session_t *session, const char *target, int quiet)
- Think about config_changed ... maybe let's create userlist_changed for this or smth?
- Globalny gg_handle_passwd (int type, int fd, watch_type_t watch, void *data)
- Need rewriting, it's buggy. We don't free memory @ type == 1, when watch wasn't executed... We always create watch @ not GG_STATE_DONE, even if there's no need, and maybe more. XXX
- Globalny gg_remove_notify_handle (void *data, va_list ap)
- We ignore gg_remove_notify() result
- Globalny gg_session_deinit (void *data, va_list ap)
- Check if we really free all memory allocated by session.
- Globalny gg_userlist_send (struct gg_session *s, userlist_t *userlist)
- XXX, think about args here, maybe let's pass only session_t ?
- Globalny gg_validate_uid (void *data, va_list ap)
Blah, irc does xstrncasecmp() here it's only xstrncmp() let's decide... GG: and gg: is proper, or only gg:
Maybe let's check if after gg: we have max 32b number.. because libgadu and gg protocol only support 32bit uids... ;)
- Globalny irc_autorejoin (session_t *s, int when, char *chan)
- We double check "REJOIN" if IRC_REJOIN_KICK
- Globalny irc_autorejoin_timer (gint type, gpointer data)
Remove some struct info from irc_onkick_handler_t? Here we use only channelname and session..
Check session with session_find_ptr() ?
- Globalny irc_onkick_handler (void *data, va_list ap)
- We don't check if nick and chan is full uid.. It's I think correct.. However can be faulty.
- Globalny irc_session_deinit (void *data, va_list ap)
Check if userlist_write() here is good.
- Globalny jabber_challenge_digest (const char *sid, const char *password, const char *nonce, const char *cnonce, const char *xmpp_temp, const char *realm)
- MD5Update() on NULL params will fail. XXX, no idea what to do.
- Globalny jabber_command_change (const char *name, const char **params, session_t *session, const char *target, int quiet)
- - reimplement it using jabber_params_split()
- Globalny jabber_command_private (const char *name, const char **params, session_t *session, const char *target, int quiet)
- Read f**cking XEP-0048,–0049, and remove security hole in jabber_handle_iq() I suspect there should be somewhere info, about to= (We recv data from our JID (or requested), not server one.)
- Globalny jabber_dcc_digest (char *sid, char *initiator, char *target)
SHA1Update() on NULL params will fail. XXX, no idea what to do.
We don't reencode params here to utf-8.
- Globalny jabber_digest (const char *sid, const char *password, int istlen)
- SHA1Update() on NULL params will fail. XXX, no idea what to do.
- Globalny jabber_iq_auth_send (session_t *s, const char *username, const char *passwd, const char *stream_id)
- It's not really XEP-0078 cause ekg2 don't support it. But it this done that way.. I don't know any server with XEP-0078 functonality..
I still rcv 'service-unavailable' or 'bad-request' ;(
But it MUST be implemented for /session disable_sasl 1
So it's just jabber:iq:auth for disable_sasl 2.
- Globalny jabber_muc_command_join (const char *name, const char **params, session_t *session, const char *target, int quiet)
make (session) variable jabber:default_muc && then if exists and params[0] has not specific server than append '@' jabber:default_muc and use it.
make (session) variable jabber:default_nickname.
history requesting, without history requesting.. etc
- Globalny jabber_protocols []
- We should set default global jabber variables with set-vars-default
- Globalny jabber_ssl_cert_verify (const gnutls_session ssl)
- It's testing function, so it don't catch all not 100% valid certificates. If you can and you know smth/ a lot about either OpenSSL or GnuTLS. Could you look at it?
- Globalny mkdir_recursive (const char *pathname, int isdir)
- Maybe at begining of function let's check with stat() if that dir/file already exists?
- Globalny msg_queue_read ()
return count of readed messages?
code which handle errors is awful and it need rewriting.
- Globalny ncurses_beep (void *data, va_list ap)
Check result of beep()
What about curses flash() ? :>
- Globalny plugin_find_uid (const char *uid)
- used only by session_add() in session.c move it there?
- Globalny print_window (const char *target, session_t *session, int activity, int separate, const char *theme,...)
- We have no policy for displaying messages by e.g. jabber resources.
For now we do: [only jabber]
- If target has '/' inside. We put there NUL char.
- After it we search for window with stripped '/'
- If founded, than done.
If not, we look for user in userlist.. And if not found, than we'll create new window with stripped '/' [only jabber]
- Globalny print_window_find (const char *target, session_t *session, int separate)
- We have no policy for displaying messages by e.g. jabber resources.
For now we do: [only jabber]
- If target has '/' inside. We put there NUL char.
- After it we search for window with stripped '/'
- If founded, than done.
If not, we look for user in userlist.. And if not found, than we'll create new window with stripped '/' [only jabber]
- Globalny protocol_message_ack (void *data, va_list ap)
- Should we remove msg from msgqueue only when sequenceid and session and rcpt matches? I think it's buggy cause user at jabber can send us acknowledge of message which we never send, but if seq match with other message, which wasn't send (because session was for example disconnected) we remove that messageid, and than we'll never send it, and we'll never know that we don't send it.
- Globalny session_add (const char *uid)
- See XXX's
- Globalny string_append_n (string_t s, const char *str, int count)
- We append here NUL terminated string, so maybe let's always do
count = xstrnlen(str, count);
?
Because now programmer can pass negative value, and it'll possible do SIGSEGV
Also we can allocate less memory for string, when for example str[count-3] was NUL char.
- Globalny string_append_raw (string_t s, const char *str, int count)
- XXX Protect from negative count (and less than -1) ?
- Globalny tlen_decode (const char *what)
- Try to rewrite
- Globalny tlen_encode (const char *what)
- Try to rewrite.
- Globalny userlist_write (session_t *session)
- Each plugin should've own userlist_write()/ userlist_read() This format is obsolete.
- Globalny watch_handle (watch_t *w)
- We only check for w->removed == -1, maybe instead change it to: w->removed != 0
- Globalny window_move (int first, int second)
- XXX: Rename to _swap, and make some real move.
- Globalny window_new (const char *target, session_t *session, int new_id)
- See XXX's
- Globalny window_session_cycle (window_t *w)
- Gdy config_window_session_allow == 2, to najpierw sprobowac znalezc dobra sesje a potem jesli nie to nastepna?
- Globalny window_target (window_t *window)
- Make it const?