summary refs log tree commit diff stats
path: root/src/common/chanopt.c
diff options
context:
space:
mode:
authorTingPing <tngpng@gmail.com>2013-04-26 09:37:14 -0300
committerTingPing <tngpng@gmail.com>2013-04-26 09:37:14 -0300
commit6982bbfef96cb6e42ca8f5f330b5fa4665ca388c (patch)
tree58b1e72c20bfc150f9d2b4da10e03f7603373ba7 /src/common/chanopt.c
parent07bc467d031cbaa47331a7fec52b6bc02ab38f95 (diff)
fix false positives when checking chanopts
Diffstat (limited to 'src/common/chanopt.c')
-rw-r--r--src/common/chanopt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/chanopt.c b/src/common/chanopt.c
index 91b5087b..65c27d58 100644
--- a/src/common/chanopt.c
+++ b/src/common/chanopt.c
@@ -159,10 +159,10 @@ chanopt_command (session *sess, char *tbuf, char *word[], char *word_eol[])
 gboolean
 chanopt_is_set (unsigned int global, guint8 per_chan_setting)
 {
-	if (per_chan_setting == SET_DEFAULT)
+	if (per_chan_setting == SET_ON || per_chan_setting == SET_OFF)
+		return per_chan_setting;
+	else
 		return global;
-
-	return per_chan_setting;
 }
 
 /* === below is LOADING/SAVING stuff only === */