From 46121d8880ab48d9a925f5b046216016d290b356 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 1 Jun 2007 16:42:59 +0000 Subject: Fix bug found by indigophone where +lk cant be set in defaultmodes git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7197 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/channels.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/channels.cpp b/src/channels.cpp index 7ed166982..dec68341e 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -43,6 +43,12 @@ void chanrec::SetModeParam(char mode,const char* parameter,bool mode_on) { if (n == custom_mode_params.end()) custom_mode_params[mode] = strdup(parameter); + + /* TODO: We really need to do away with this in 1.2 */ + if (mode == 'l') + this->limit = atoi(parameter); + else if (mode == 'k') + strlcpy(this->key, parameter, sizeof(this->key)); } else { @@ -51,6 +57,12 @@ void chanrec::SetModeParam(char mode,const char* parameter,bool mode_on) free(n->second); custom_mode_params.erase(n); } + + /* TODO: See above */ + if (mode == 'l') + this->limit = 0; + else if (mode == 'k') + *this->key = 0; } } -- cgit v1.2.3