diff --git a/botrules.module b/botrules.module
index becaf8b..22f5dac 100644
--- a/botrules.module
+++ b/botrules.module
@@ -486,7 +486,7 @@ function botrules_refresh_vars() {
  */
 function botrules_part_channels() {
   global $irc;
-  $channels = explode(',', variable_get('bot_channels', '#botwar'));
+  $channels = array_map('strtolower', explode(',', variable_get('bot_channels', '#botwar')));
   $channels_to_part = array_diff(array_keys($irc->_channels), $channels);
   if (count($channels_to_part) > 0) {
     foreach ($channels_to_part as $channel) {
