#include "common.h"
#include "commands.h"
+#include "str.h"
int cmd_capability(struct client *client)
{
- client_send_line(client, "* CAPABILITY " CAPABILITY_STRING);
+ client_send_line(client, t_strconcat("* CAPABILITY ",
+ str_c(capability_string), NULL));
- client_sync_full_fast(client);
client_send_tagline(client, "OK Capability completed.");
return TRUE;
}
extern struct ioloop *ioloop;
extern unsigned int max_custom_flag_length, mailbox_check_interval;
+extern string_t *capability_string;
+
#endif
#include "common.h"
#include "ioloop.h"
#include "ostream.h"
+#include "str.h"
#include "lib-signals.h"
#include "rawlog.h"
#include "restrict-access.h"
static struct module *modules;
static char log_prefix[128]; /* syslog() needs this to be permanent */
+string_t *capability_string;
+
static void sig_quit(int signo __attr_unused__)
{
io_loop_stop(ioloop);
i_fatal("USER environment missing");
}
+ capability_string = str_new(default_pool, sizeof(CAPABILITY_STRING)+32);
+ str_append(capability_string, CAPABILITY_STRING);
+
hin = 0; hout = 1;
rawlog_open(&hin, &hout);