aboutsummaryrefslogtreecommitdiffstats
path: root/root_commands.c
Commit message (Collapse)AuthorAgeLines
* Added an interface for the listing of existing chatroomsjgeboski2016-06-29-5/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several protocols can provide a list of existing chatrooms that a user is able join. This is crucial for the usage of several protocols, most notably Purple and Facebook. Plugins wishing to support this extended functionality must implement the new prpl->chat_list() function. This implemented function will in most cases send a remote request for the list of chatrooms. Once the list of chatrooms is obtained, a bee_chat_info_t GSList must be created and assigned to the im_connection->chatlist field. Then a call to the bee_chat_list_finish() is needed to display the list to the user. The chat list is maintained entirely by the plugin, so it is important to ensure all pointers related to the chat list remain valid until the chat list is set to NULL. This list is used internally by bitlbee to calculate indexes, which then allows the user to join a chat with an index, rather than some random identifier. It also important to ensure the list is properly freed whenever it is updated, or when the account is disconnect via the prpl->logout() function. On the user interface side of things, the 'chat list' subcommand was recommissioned. For a user to list the existing chat rooms: chat list <account id> Afterwards a user can join a chatroom in the list with its index. This extends the functionality of the 'chat add' subcommand by adding in support for the exclamation point operator to denote an index. chat add <account id> !<index> [channel]
* Show the enabled/disabled protocols in the 'plugins' command outputjgeboski2016-05-25-7/+60
|
* Implemented plugin information for external pluginsjgeboski2016-05-25-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of now, bitlbee will load any plugin regardless of the ABI it was built against. This is really problematic when structures or symbols are changed within bitlbee. This often leads to the plugin not loading or the plugin acting in an undefined way. Typically a simple rebuild of the plugin will resolve such issues, but many users have no idea that this is required after they have updated bitlbee. Furthermore, it is often times impossible to determine the version of a plugin, without relying on the package manager of the system. This is quite a problem when users are reporting bugs for external plugins, and they have no idea what version of the plugin they are running. This is also an opportunity to provide additional metadata for each plugin that can then be displayed to the user. Solving these issues is done by adding a new required function to each plugin. The init_plugin_info() function must now be implemented along with the init_plugin() function. This function then returns a static structure, which retains all of the metadata for the plugin. Then this is used by bitlbee to check the ABI version and provide information to the user. The introduction of the new function is required as bitlbee needs to obtain the ABI version before calling init_plugin(). The boiler-plate implementation of init_plugin_info(): #ifdef BITLBEE_ABI_VERSION_CODE struct plugin_info *init_plugin_info(void) { static struct plugin_info info = { BITLBEE_ABI_VERSION_CODE, /* Required */ "plugin-name", /* Required */ "1.3.3.7", /* Required */ "A short description of the plugin", /* Optional */ "First Last <alias@domain.tld>", /* Optional */ "http://www.domain.tld" /* Optional */ }; return &info; } #endif The example wraps the function declaration in an if block for backwards compatibility with older bitlbee versions. Displaying the plugin metadata is done via the newly added "plugins" command, which simply dumps formatted data to the root channel.
* Authentication: scaffolding for multiple authentication backendsDennis Kaarsemaker2016-03-25-5/+7
| | | | | | | | | | | | | | | | | | | | | | | Instead of always putting users passwords in XML files, allow site admins to configure a different authentication method to integrate authentication with other systems. This doesn't add any authentication backends yet, merely the scaffolding. Notably: - Password checking and loading/removing from storage has been decoupled. A new auth_check_pass function is used to check passwords. It does check against the configured storage first, but will handle the authentication backends as well. The XML storage merely signals that a user's password should be checked using an authentication backend. - If unknown-to-bitlbee users identify using an authentication backend, they are automatically registered. - If an authentication backend is used, that fact is stored in the XML file, the password is not. Passwords are also stored unencrypted in this case, as the password used to encrypt them can change underneath us. - configure and Makefile changes for the backend objects
* Add a setting to disable 'account add'Dennis Kaarsemaker2016-03-23-0/+5
| | | | | In a locked down bitlbee instance it is useful to disable the 'account add' command.
* Allow individual settings to be locked downDennis Kaarsemaker2016-03-23-0/+4
| | | | | | This allows a site admin who pregenerates configs to mark certain settings as untouchable, ensuring that users cannot mess up their settings too badly.
* Support for locked-down accountsDennis Kaarsemaker2016-03-23-1/+7
| | | | | | | | | | | | | In certain situations, e.g. when working with pregenerated configurations, it is useful to be able lock down accounts so they cannot be deleted and authentication information (user, password, server) cannot be changed. We mark such sensitive settings with ACC_SET_LOCKABLE and will refuse to change them if the account is locked by setting the ACC_FLAG_LOCKED flag. This flag is stored in the xml files as account attribute locked="true".
* root_commands: Fix use-after-free after doing "transfer reject"dequis2016-01-26-1/+3
| | | | | | Not a big deal because as far as I can see not much happens between the g_slist_remove() in dcc_close() and accessing files->next. I'd expect that pointer to remain null after being freed most of the time.
* Show a nicer message when a protocol is disabled in account adddequis2015-11-23-1/+5
| | | | | | | | | | | | This adds the disabled protocols' prpl structs to a different linked list, only used for this lookup. They were previously marked as leaking by valgrind, so, whatever. I can't free them, since some protocols memdup() it after attempting to register. I think disabling the protocols from bitlbee.conf is just stupid and provides no real benefits, but someone will complain if i get rid of it. So this just improves the error message to make it less confusing when someone accidentally uncomments that crap.
* IRCv3 SASL capability + PLAIN methoddequis2015-10-08-0/+12
| | | | | | | | | | | | | | | | | | | | | Only plain, no other methods. We don't have built-in SSL to implement EXTERNAL (certfp) and nothing else is worth implementing. The actual authentication is pretty much like sending a server password (when the server's authmode isn't closed), which means it happens in cmd_identify, but this code also calls storage_check_pass() to send the required success/failure replies. SASL doesn't give us much benefit other than standards compliance, but some clients might appreciate it. And having a fifth way to do the same thing doesn't hurt! Now we have: - identify in &bitlbee - identify to nickserv (alias for root) - 'nickserv' and 'ns' irc commands - server password - sasl plain
* Reindent everything to K&R style with tabsIndent2015-02-20-965/+841
| | | | | | | Used uncrustify, with the configuration file in ./doc/uncrustify.cfg Commit author set to "Indent <please@skip.me>" so that it's easier to skip while doing git blame.
* Fix incorrect Free Software Foundation addressMatej Cepl2015-01-16-2/+2
|
* Allow filtering of blist outputtribut2014-07-24-40/+47
| | | | | Add an (optional) second parameter to blist. If present, it is treated as regex and used to filter the result list.
* Add limit param to split_command_parts(), fix twitter quotes bugdequis2014-07-24-1/+1
| | | | Only took me a few months to write. I even added a test case.
* Allow use of "ac x set -del password" to use /oper to change the passwordWilmer van der Gaast2014-02-28-1/+1
| | | | | "securely". Patch from Flexo, bug #1117.
* Add irc_t* argument to all relevant nick_*() functions.Wilmer van der Gaast2013-04-20-2/+2
|
* Merging "storage" branch which I wrote long ago. It separates generation ofWilmer van der Gaast2013-04-20-1/+1
|\ | | | | | | | | | | XML-formatted user configs from disk I/O so we can try to start using other mechanisms to store them (a REST API or something, for example).
| * Make error message on using save without registering/identifying a littleWilmer van der Gaast2012-06-07-1/+1
| | | | | | | | | | more helpful.
* | I'm still bored on a long flight. Wrote a script to automatically updateWilmer van der Gaast2013-02-21-1/+1
| | | | | | | | | | | | | | my copyright mentions since some were getting pretty stale. Left files not touched since before 2012 alone so that this change doesn't touch almost EVERY source file.
* | For the lazy among us: When adding a Jabber/MSN contact within the sameWilmer van der Gaast2013-02-21-0/+14
| | | | | | | | | | domain like you, you can omit the domain name.
* | Merge from vmiklos. Adds a "group info" command to list members of a group.Wilmer van der Gaast2013-02-10-0/+23
|\ \
| * | Implement 'group info' command to list members of a group (#741)Miklos Vajna2013-02-09-0/+31
|/ /
* / Removing comment about new syntax for the "account" command, which by nowWilmer van der Gaast2012-12-02-2/+1
|/ | | | | is two years old already.
* Allow identify -noload/-force without typing a password. (/OPER)Wilmer van der Gaast2012-03-19-0/+4
| | | | | Patch from trac3r, bug #814.
* Move the check for "set auto_connect" to a more sensible location. #878.Wilmer van der Gaast2011-12-29-3/+3
|
* A few more minor cleanups before merging this into mainline.Wilmer van der Gaast2011-12-26-1/+1
|
* Make it easier to add OAuth-authenticated accounts without having to typeWilmer van der Gaast2011-12-21-3/+21
| | | | | a bogus password.
* As I intended for a while already, use account tags everywhere instead ofWilmer van der Gaast2011-12-13-11/+12
| | | | | | | | "protocol(handle)". It's guaranteed to be unique and also shorter. It may suck for people who have multiple accounts and didn't change their tags, but that'll hopefully remind them to change them.
* Merging non-SASL authentication patch from #863. This also implementsWilmer van der Gaast2011-12-07-1/+1
| | | | | | | hidden-default settings, which means a setting is hidden unless it was changed from the default. This seems like appropriate behaviour for something as obscure as this.
* rename irc_usermsg to irc_rootmsg.unknown2011-10-03-128/+128
| | | | | | add new irc_usermsg, irc_usernotice. deliver user-specific messages from libotr as notices to that user.
* Oops. Forgot to set OPER_HACK_ACCOUNT_ADD when adding an account.Wilmer van der Gaast2011-02-01-0/+4
|
* More password paranoia: Allow omitting the identify/register password asWilmer van der Gaast2011-02-01-4/+16
| | | | | | | | | | well (and enter it using /OPER instead). This is a gross hack and indeed still not solid: In irssi one can still use /RAWLOG SAVE to find the OPER line sent to BitlBee (and of course not everyone uses SSL to talk to remote BitlBee servers). This only works within 10-30 minutes after entering the password though.
* rename -delWilmer van der Gaast2010-12-05-1/+8
|
* Some polishing/documentation for the "account add" without password hack.Wilmer van der Gaast2010-11-24-4/+2
|
* Allow omitting the password argument to "account add", to then separatelyWilmer van der Gaast2010-11-22-3/+24
| | | | | | | | | enter the password using the /OPER command (which will not echo to the screen and/or logs). It's a fairly ugly hack but the improved password security is worth it IMHO.
* Be clearer about password settings being intentionally hidden (and notWilmer van der Gaast2010-11-21-1/+4
| | | | | really empty). Bug #657 and confusing BitlBee users since probably 2002.
* Oops. Just in time I noticed the whatsnew code doesn't kick in for pre-1.33.0Wilmer van der Gaast2010-10-22-0/+8
| | | | | accounts. Fixed now.
* Merging mainline, which includes a huge msnp13 merge.Wilmer van der Gaast2010-10-02-22/+6
|\ | | | | | | | | | | Not 100% sure about the OpenSSL merge, should double check that but I'm currently offline.
| * Move whatsnew stuff into help.txt. Stop putting too much string contentWilmer van der Gaast2010-09-06-22/+6
| | | | | | | | | | into the executable.
* | Merge mainline stuff.Wilmer van der Gaast2010-08-31-0/+6
|\|
| * I guess the nick command was never deprecated clearly, so let's do that now.Wilmer van der Gaast2010-08-25-0/+6
| |
* | Added root_command_add() and use it to create the "otr" command.Wilmer van der Gaast2010-08-31-10/+45
| |
* | First step in this merge. Mostly a bzr merge and then a cleanup of conflictsWilmer van der Gaast2010-08-24-0/+2
|\ \ | |/ |/| | | | | and parts I want to/have to redo (because of ui-fix).
| * merge in bitlbee 1.2.6Sven Moritz Hallberg2010-06-03-1/+30
| |\
| * \ merge in bitlbee 1.2.5Sven Moritz Hallberg2010-06-03-75/+14
| |\ \
| * \ \ merge in bitlbee 1.2.4Sven Moritz Hallberg2010-06-03-1/+3
| |\ \ \
| * \ \ \ pretty blind try at merging in the latest trunkSven Moritz Hallberg2009-03-12-147/+258
| |\ \ \ \
| * | | | | commit updates by ashish shukla <wahjava@gmail.com>Sven Moritz Hallberg2009-03-12-29/+62
| | | | | |
| * | | | | merge in latest trunkSven Moritz Hallberg2008-07-17-2/+74
| |\ \ \ \ \
| * \ \ \ \ \ merge in upstream changesSven Moritz Hallberg2008-02-16-5/+6
| |\ \ \ \ \ \