From: <cf...@us...> - 2010-02-07 17:52:49
|
Revision: 1744 http://znc.svn.sourceforge.net/znc/?rev=1744&view=rev Author: cflakes Date: 2010-02-07 17:52:42 +0000 (Sun, 07 Feb 2010) Log Message: ----------- Added support for the MaxJoins and JoinTries variables to the admin module. Modified Paths: -------------- trunk/modules/admin.cpp Modified: trunk/modules/admin.cpp =================================================================== --- trunk/modules/admin.cpp 2010-02-07 17:45:20 UTC (rev 1743) +++ trunk/modules/admin.cpp 2010-02-07 17:52:42 UTC (rev 1744) @@ -75,7 +75,9 @@ {"QuitMsg", string}, {"BufferCount", integer}, {"KeepBuffer", boolean}, - {"Password", string} + {"Password", string}, + {"JoinTries", integer}, + {"MaxJoins", integer} }; for (unsigned int i = 0; i != ARRAY_SIZE(vars); ++i) { VarTable.AddRow(); @@ -162,6 +164,10 @@ PutModule("BufferCount = " + CString(user->GetBufferCount())); else if (var == "keepbuffer") PutModule("KeepBuffer = " + CString(user->KeepBuffer())); + else if (var == "maxjoins") + PutModule("MaxJoins = " + CString(user->MaxJoins())); + else if (var == "jointries") + PutModule("JoinTries = " + CString(user->JoinTries())); else PutModule("Error: Unknown variable"); } @@ -252,6 +258,16 @@ user->SetPass(sHash, CUser::HASH_DEFAULT, sSalt); PutModule("Password has been changed!!"); } + else if (var == "maxjoins") { + unsigned int i = value.ToUInt(); + user->SetMaxJoins(i); + PutModule("MaxJoins = " + CString(user->MaxJoins())); + } + else if (var == "jointries") { + unsigned int i = value.ToUInt(); + user->SetJoinTries(i); + PutModule("JoinTries = " + CString(user->JoinTries())); + } else PutModule("Error: Unknown variable"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |