diff options
-rw-r--r-- | share/doc/python.md | 40 | ||||
-rw-r--r-- | src/common/plugin.c | 20 | ||||
-rw-r--r-- | src/common/util.c | 12 |
3 files changed, 51 insertions, 21 deletions
diff --git a/share/doc/python.md b/share/doc/python.md index f9715f62..dc4ff1ec 100644 --- a/share/doc/python.md +++ b/share/doc/python.md @@ -155,13 +155,20 @@ context. At the moment of this writing, the following information types are available to be queried: * **away:** Away reason or None if you are not away. - * **channels** Channel of the current context. + * **channel:** Channel name of the current context. + * **charset:** Charset in current context. + * **event_name NAME:** Returns text event string for requested event. + * **gtkwin_ptr:** Current Gtk Window. * **hexchatdir:** HexChat config directory e.g.: "~/.config/hexchat". - * **hostname:** Real hostname of the server you connected to. + * **host:** Real hostname of the server you connected to. + * **inputbox:** Contents of inputbox. * **network:** Current network name or None. * **nick:** Your current nick name. + * **nickserv:** Current networks nickserv password or None. + * **modes:** Current channel modes or None. * **server:** Current server name (what the server claims to be) or None if you are not connected. * **topic:** Current channel topic. + * **win_status:** Returns status of window: 'active', 'hidden', or 'normal'. * **version:** HexChat version number. Example: @@ -217,14 +224,35 @@ The channels list type gives you access to the channels, queries and their servers. The folloing attributes are available in each list item: * **channel:** Channel or query name. + * **chantypes:** Channel types e.g. #!&. * **context:** A context object, giving access to that channel/server. + * **id:** Unique server id. + * **lag:** Latency in milliseconds. + * **maxmodes:** Max modes per line. * **network:** Network name to which this channel belongs. + * **nickprefixes:** Nickname prefixes e.g. @%+. + * **nickmodes:** Nickname mode chars e.g. ov. + * **queue:** Number of bytes in the send-queue. * **server:** Server name to which this channel belongs. + * **users:** Number of users in the channel. * **type:** Type of context. * 1: Server * 2: Channel * 3: Dialog + * **flags:** Bit field of flags: + * 0: Connected + * 1: Connecting + * 2: Away + * 3: End of MOTD (Login Complete) + * 4: Has WHOX + * 5: Has IDMSG + * 6: Join/Parts hidden + * 7: Unused + * 8: Beep on Message + * 9: Blink Tray + * 10: Blink Task Bar + ##### dcc @@ -259,9 +287,13 @@ following attributes are available in each list item: The users list type gives you access to a list of users in the current channel. The following attributes are available in each list item: - * **nick:** Nick name. + * **away:** Away status. + * **lasttalk:** Last time the user was seen talking. * **host:** Host name in the form user@host (or None, if not known). + * **nick:** Nick name. * **prefix:** Prefix character, .e.g: @ or +. Points to a single char. + * **realname:** Real name. + * **selected:** Selected status in the userlist. ##### ignore @@ -278,7 +310,7 @@ following attributes are available in each list item: * 4: invite * 5: unignore * 6: nosave - * 7:dcc + * 7: dcc ### Hook functions diff --git a/src/common/plugin.c b/src/common/plugin.c index d4081968..a30ba575 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -1043,19 +1043,17 @@ hexchat_get_info (hexchat_plugin *ph, const char *id) /* do the session independant ones first */ switch (hash) { - case 0x325acab5: /* libdirfs */ - return HEXCHATLIBDIR; + case 0x325acab5: /* libdirfs */ + return HEXCHATLIBDIR; - case 0x14f51cd8: /* version */ - return PACKAGE_VERSION; + case 0x14f51cd8: /* version */ + return PACKAGE_VERSION; - case 0xdd9b1abd: /* xchatdir */ - case 0x9a70daba: /* hexchatdir */ - return get_xdir (); - - case 0xe33f6c4a: /* xchatdirfs */ - case 0xc1a52107: /* hexchatdirfs */ - return get_xdir (); + case 0xdd9b1abd: /* xchatdir */ + case 0x9a70daba: /* hexchatdir */ + case 0xe33f6c4a: /* xchatdirfs */ + case 0xc1a52107: /* hexchatdirfs */ + return get_xdir (); } sess = ph->context; diff --git a/src/common/util.c b/src/common/util.c index d23a1d44..d4bfeac9 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -254,14 +254,14 @@ file_part (char *file) { switch (*file) { - case 0: - return (filepart); - case '/': + case 0: + return (filepart); + case '/': #ifdef WIN32 - case '\\': + case '\\': #endif - filepart = file + 1; - break; + filepart = file + 1; + break; } file++; } |