Added TWC_CHECK_GROUP_CHAT macro.

master
Håvard Pettersson 10 years ago
parent 92859ce6fc
commit e97b1da067

@ -73,6 +73,22 @@ enum TWC_FRIEND_MATCH
return WEECHAT_RC_OK; \
}
/**
* Make sure a command is executed in a group chat buffer. If not, warn user
* and abort.
*/
#define TWC_CHECK_GROUP_CHAT(chat) \
if (!chat || chat->group_number < 0) \
{ \
weechat_printf(NULL, \
"%s%s: command \"%s\" must be executed in a group " \
"chat buffer ", \
weechat_prefix("error"), \
weechat_plugin->name, \
argv[0]); \
return WEECHAT_RC_OK; \
}
/**
* Make sure a profile with the given name exists. If not, warn user and
* abort.

Loading…
Cancel
Save