+} while(0)
+
+/* Send notify to operators */
+#define SILC_SERVER_SEND_OPERS(server, route, local, type, fmt) \
+do { \
+ char *__fmt__ = silc_format fmt; \
+ silc_server_send_opers_notify(server, route, local, \
+ type, 1, __fmt__, strlen(__fmt__)); \
+ silc_free(__fmt__); \
+} while(0)
+
+/* Check whether rekey protocol is active */
+#define SILC_SERVER_IS_REKEY(sock) \
+ (sock->protocol && sock->protocol->protocol && \
+ sock->protocol->protocol->type == SILC_PROTOCOL_SERVER_REKEY)
+
+/* Check whether backup resuming protocol is active */
+#define SILC_SERVER_IS_BACKUP(sock) \
+ (sock->protocol && sock->protocol->protocol && \
+ sock->protocol->protocol->type == SILC_PROTOCOL_SERVER_BACKUP)
+
+/* Output a message to stderr or to the appropriate log facility wether
+ we are in the background or not. */
+#define SILC_SERVER_LOG_INFO(fmt) \
+ silc_server_stderr(SILC_LOG_INFO, silc_format fmt)
+#define SILC_SERVER_LOG_WARNING(fmt) \
+ silc_server_stderr(SILC_LOG_WARNING, silc_format fmt)
+#define SILC_SERVER_LOG_ERROR(fmt) \
+ silc_server_stderr(SILC_LOG_ERROR, silc_format fmt)
+#define SILC_SERVER_LOG_FATAL(fmt) \
+ silc_server_stderr(SILC_LOG_WARNING, silc_format fmt)