Another year is about to end... So we have to update these damn copyright information :P
[NeonServV5.git] / src / cmd_neonserv_move.c
index 28afb59dcc73a1a6888b3acfa34b70243f146c0f..211247e8643c15e262aaaa280bd8fc8cc72948c9 100644 (file)
@@ -1,5 +1,5 @@
-/* cmd_neonserv_move.c - NeonServ v5.1
- * Copyright (C) 2011  Philipp Kreil (pk910)
+/* cmd_neonserv_move.c - NeonServ v5.3
+ * Copyright (C) 2011-2012  Philipp Kreil (pk910)
  * 
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -80,7 +80,7 @@ CMD_BIND(neonserv_cmd_move) {
         printf_mysql_query("DELETE FROM `owner_history` WHERE `owner_history_cid` = '%d'", chanid);
         printf_mysql_query("DELETE FROM `channels` WHERE `channel_id` = '%d'", chanid);
     }
-    printf_mysql_query("UPDATE `channels` SET `channel_name` = '%s' WHERE `channel_id` = '%s'", escape_string(new_channel), row[1]);
+    printf_mysql_query("UPDATE `channels` SET `channel_name` = '%s' WHERE `channel_name` = '%s'", escape_string(new_channel), escape_string(channel));
     struct ChanNode *channode = getChanByName(channel);
     if(channode && channode->flags & CHANFLAG_REQUESTED_CHANINFO) {
         channode->flags &= ~CHANFLAG_CHAN_REGISTERED;