summary refs log tree commit diff stats
AgeCommit message (Expand)Author
2014-04-06Add account to Join eventTingPing
2014-04-02Add marker-line functionality for scrollback, instant seek.RichardHitt
2014-03-30Merge pull request #929 from hexchat/928Richard Hitt
2014-03-29Fix scrollback_load to deal with e.g. the output of /HELPRichardHitt
2014-03-24Improve handling scrollback when gui_tab_server==FALSERichardHitt
2014-03-19Correctly scroll down autojoined channelsRichardHitt
2014-03-19Fix three miscellaneous bugs in gtk_xtext_get_word()RichardHitt
2014-03-18win32: Quote paths when invoking glib-compile-resources.exeArnavion
2014-03-18win32: Powershell.exe absolutely needs "-File" when running scripts or else i...Arnavion
2014-03-17win32: Bump python to 3.4.0TingPing
2014-03-15Disable compression on tree_channel.pngTingPing
2014-03-15Disable hiding characters in the inputTingPing
2014-03-15Partial revert of 5f732128TingPing
2014-03-11Fix miscapitalizationEustachy Kapusta
2014-03-08Add ElectroCodeKen Spencer
2014-03-08Added Anthrochat and Furnet to server lista Code Lizard
2014-02-28win32: Updated Python dependencies to 2.7.6 and 3.3.4Arnavion
2014-02-18Minor redesign to text events windowTingPing
2014-02-16Remove migration code for xchat 1 colorsTingPing
2014-02-16Properly handle shift tab in keyboard shortcutsTingPing
2014-02-16Use more user friendly label for keys in keyboard shortcutsTingPing
2014-02-16Add safemode action to desktop fileTingPing
2014-02-16Translate desktop filesTingPing
2014-02-15Tweak readme formattingTingPing
2014-02-15Add Jenkins badgetomek
2014-02-15Hide tray balloon option on OSXTingPing
2014-02-15Fix warning..TingPing
2014-02-15Use GRegex for channel list searchTingPing
2014-02-14Tweak column sizing in channel listTingPing
2014-02-14Build with GTK_DISABLE_DEPRECATEDTingPing
2014-02-14Redesign keyboard shortcuts windowTingPing
2014-02-14Cleanup the preferences windowTingPing
2014-02-12Fix some leaksTingPing
2014-02-12Remove unused functionTingPing
2014-02-12Fix warningTingPing
2014-02-09Show help as tooltips in editlistsTingPing
2014-02-07Fix hiding unsupported channel modes in topicbarTingPing
2014-02-07Fix some warnings in editlistTingPing
2014-02-06Use a single marshal file for entire projectTingPing
2014-02-06Use a standard GtkScrolledWindow with xtextTingPing
2014-02-06win32: Update installer for new PerlTingPing
2014-02-05Revert e64aa93f8TingPing
2014-02-05Use persitance with libnotifyTingPing
2014-02-04Fix many many problems in xtext.c related to character width.RichardHitt
2014-02-04Add /getbool commandTingPing
2014-02-04osx: Set Menlo as default fontTingPing
2014-02-04Print help messages for user commandsTingPing
2014-02-04Merge pull request #890 from orium/lagmeter-fixesTingPing
2014-02-02Fix warningTingPing
2014-02-02Merge pull request #892 from ShutterQuick/patch-1TingPing
="cpf">"irc.h" /** * Parses an IRC message. The words array should contain the message splitted * at spaces. The prefix and command is extracted from the message, and * parameters_offset is set to the index of the first parameter. */ bool irc_parse_message(const char *words[], const char **prefix, const char **command, size_t *parameters_offset) { size_t w = 1; if (prefix) *prefix = NULL; if (command) *command = NULL; // See if the message starts with a prefix (sender user) if (words[w][0] == ':') { if (prefix) *prefix = &words[w][1]; w++; } // Check command if (words[w][0] == '\0') return false; if (command) *command = words[w]; w++; *parameters_offset = w; return true; } /** * Finds the nick part of a "IRC prefix", which can have any * of the following forms: * * nick * nick@host * nick!ident * nick!ident@host */ char *irc_prefix_get_nick(const char *prefix) { const char *end; char *nick; size_t length; if (!prefix) return NULL; // Find end of nick end = prefix; while (*end != '\0' && *end != '!' && *end != '@') end++; // Allocate string length = end - prefix; nick = malloc(length+1); if (!nick) return NULL; // Copy to string memcpy(nick, prefix, length); nick[length] = '\0'; return nick; } /** * Compares two nick names. Return 0 if equal. Otherwise the return value is * less than zero if a is less than b or greater than zero if a is greater * than b. */ int irc_nick_cmp(const char *a, const char *b) { char ac; char bc; char diff; for (;;) { ac = *(a++); bc = *(b++); // Change into IRC uppercase (see RFC 2812 section 2.2) if (ac >= 'a' && ac <= '~') ac &= ~0x20; if (bc >= 'a' && bc <= '~') bc &= ~0x20; diff = ac - bc; if (diff) return diff; if (!ac) return 0; } }