Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/commands.c @ 1301:37b41ed9ed35
Fixed compiler warnings
author | Frank Zschockelt <mcabber_otr[at]freakysoft.de> |
---|---|
date | Thu, 30 Aug 2007 02:49:36 +0200 |
parents | 3b338a5c01fc |
children | 9bc68473f8a3 |
comparison
equal
deleted
inserted
replaced
1300:0d4a1699accb | 1301:37b41ed9ed35 |
---|---|
3051 | 3051 |
3052 if (!fjid && !policy) { | 3052 if (!fjid && !policy) { |
3053 scr_LogPrint(LPRINT_NORMAL, "default otrpolicy: %s", | 3053 scr_LogPrint(LPRINT_NORMAL, "default otrpolicy: %s", |
3054 string_for_otrpolicy(settings_otr_getpolicy(NULL))); | 3054 string_for_otrpolicy(settings_otr_getpolicy(NULL))); |
3055 settings_foreach(SETTINGS_TYPE_OTR, &dump_otrpolicy, NULL); | 3055 settings_foreach(SETTINGS_TYPE_OTR, &dump_otrpolicy, NULL); |
3056 free_arg_lst(paramlst); | |
3056 return; | 3057 return; |
3057 } | 3058 } |
3058 | 3059 |
3059 if (!policy) { | 3060 if (!policy) { |
3060 scr_LogPrint(LPRINT_NORMAL, "Unrecognized or missing parameter!"); | 3061 scr_LogPrint(LPRINT_NORMAL, |
3062 "Please call otrpolicy correctly: /otrpolicy (default|jid) " | |
3063 "(plain|manual|opportunistic|always)"); | |
3061 free_arg_lst(paramlst); | 3064 free_arg_lst(paramlst); |
3062 return; | 3065 return; |
3063 } | 3066 } |
3064 | 3067 |
3065 if (!strcasecmp(policy, "plain")) | 3068 if (!strcasecmp(policy, "plain")) |
3070 p = opportunistic; | 3073 p = opportunistic; |
3071 else if (!strcasecmp(policy, "always")) | 3074 else if (!strcasecmp(policy, "always")) |
3072 p = always; | 3075 p = always; |
3073 else { | 3076 else { |
3074 /* Fail, we don't know _this_ policy*/ | 3077 /* Fail, we don't know _this_ policy*/ |
3078 scr_LogPrint(LPRINT_NORMAL, "mcabber doesn't support _this_ policy!"); | |
3079 free_arg_lst(paramlst); | |
3080 return; | |
3075 } | 3081 } |
3076 | 3082 |
3077 if(!strcasecmp(fjid, "default")){ | 3083 if(!strcasecmp(fjid, "default")){ |
3078 /*set default policy*/ | 3084 /*set default policy*/ |
3079 settings_otr_setpolicy(NULL, p); | 3085 settings_otr_setpolicy(NULL, p); |
3086 free_arg_lst(paramlst); | |
3080 return; | 3087 return; |
3081 } | 3088 } |
3082 // Allow special jid "" or "." (current buddy) | 3089 // Allow special jid "" or "." (current buddy) |
3083 if (fjid && (!*fjid || !strcmp(fjid, "."))) | 3090 if (fjid && (!*fjid || !strcmp(fjid, "."))) |
3084 fjid = NULL; | 3091 fjid = NULL; |