Skip to content

Commit

Permalink
* Tagged as 1.4.4
Browse files Browse the repository at this point in the history
* Added 'Archived by' column to submission and protest archive
* Fixed some error messages
* Now underline the active subnavi link
* Added status indication to ViewCommunityProfile
* Fixed name field being blank if admin has been deleted
* Removed unnecessary files
* Fixed bans added while database was unavailable aren't added afterwards
  • Loading branch information
peace-maker committed Aug 10, 2009
1 parent 0e6adfd commit 694ba3a
Show file tree
Hide file tree
Showing 44 changed files with 97,419 additions and 96,614 deletions.
61 changes: 41 additions & 20 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,49 @@ Legend:
! = Fixed bug
? = Other stuff

(28/07/09): Version 1.4.4
-----------------------
01. * Added 'Archived by' field to submission and protest archive
02. * Added immunity check for webbans
03. * Now underline the active subnavi link
04. + Added status indication to ViewCommunityProfile
05. + Added playername to exported ban files
06. + Changed every javascript 'top.location' to 'window.location' for frame support
07. ! Fixed bans added while database was unavailable aren't added afterwards
08. ! Fixed root permission checkbox doesn't uncheck all webpermissions
09. ! Fixed old server permissions aren't removed, if server has been deleted
10. ! Fixed permission problem with adding new admins having no webgroup, but a serveradmingroup
11. ! Fixed some security problems, added more logging
12. ! Fixed name field being blank if admin has been deleted
13. ! Fixed submission/protest archive pagination
14. ! Fixed rcon panel doesn't show a message if server unavailable
15. ! Fixed comments not showing line breaks
16. ! Fixed temporary bans aren't removed for TF2 bans if unbanned from webpanel
17. - Removed unnecessary files
18. ? Updated IpToCountry.csv for country lookup

(25/06/09): Version 1.4.3
-----------------------
+ Paginated Submission/Protest (archive)
+ Added password check on email change
+ Improved siteloading speed for adminlist, banlist and banadministration
+ Now supporting as many reasons one likes - paginated those menus
+ Hiding "bans by admin" search when hiding admin names is enabled on banlist
+ Added compileflag to show debugmessages
+ Updated Polish Translations submitted by `Zuko
! Fixed L4D kicking/banning from servers page
! Fixed bans don't get written to the database, if admin isn't in the database
! Fixed "SetPackPosition" error
! Fixed "Banned by" admin name always showing own name in protest email
! Fixed too short server hostnames on serverlist
! Fixed unbanned bans showing up as "Expired"
! Fixed adding <br /> tags to ban/unban reasons
! Fixed 'rcon' column in 'sb_servers' doesn't have default value
! Fixed admins with " ' " in name cause error
! Fixed long words break the submission page
! Fixed not showing old message when editing comment in textarea
! Fixed some random autoquoting problems with IIS in the installer
! Fixed playernames with quotation marks in it show a backslash on the dashboard if banned ingame
01. + Paginated Submission/Protest (archive)
02. + Added password check on email change
03. + Improved siteloading speed for adminlist, banlist and banadministration
04. + Now supporting as many reasons one likes - paginated those menus
05. + Hiding "bans by admin" search when hiding admin names is enabled on banlist
06. + Added compileflag to show debugmessages
07. + Updated Polish Translations submitted by `Zuko
08. ! Fixed L4D kicking/banning from servers page
09. ! Fixed bans don't get written to the database, if admin isn't in the database
10. ! Fixed "SetPackPosition" error
11. ! Fixed "Banned by" admin name always showing own name in protest email
12. ! Fixed too short server hostnames on serverlist
13. ! Fixed unbanned bans showing up as "Expired"
14. ! Fixed adding <br /> tags to ban/unban reasons
15. ! Fixed 'rcon' column in 'sb_servers' doesn't have default value
16. ! Fixed admins with " ' " in name cause error
17. ! Fixed long words break the submission page
18. ! Fixed not showing old message when editing comment in textarea
19. ! Fixed some random autoquoting problems with IIS in the installer
20. ! Fixed playernames with quotation marks in it show a backslash on the dashboard if banned ingame

(30/03/09): Version 1.4.2
-----------------------
Expand Down
Binary file modified game_upload/addons/sourcemod/plugins/sourcebans.smx
Binary file not shown.
52 changes: 22 additions & 30 deletions game_upload/addons/sourcemod/scripting/sourcebans.sp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <adminmenu>
#include "dbi.inc"

#define SB_VERSION "1.4.3"
#define SB_VERSION "1.4.4"

//GLOBAL DEFINES
#define YELLOW 0x01
Expand Down Expand Up @@ -129,6 +129,7 @@ public OnPluginStart()
LoadTranslations("common.phrases");
LoadTranslations("plugin.basecommands");
LoadTranslations("sourcebans.phrases");
LoadTranslations("basebans.phrases");
loadAdmins = loadGroups = loadOverrides = false;

CvarHostIp = FindConVar("hostip");
Expand Down Expand Up @@ -662,9 +663,9 @@ public OnAdminMenuReady(Handle:topmenu)
"sm_ban", // The command to be finally called (Override checks)
ADMFLAG_BAN); // What flag do we need to see the menu option
decl String:temp[125];
Format(temp, 125, "Result of AddToTopMenu: %d", res);
LogToFile(logFile, temp);
LogToFile(logFile, "Added Ban option to admin menu");
Format(temp, 125, "Result of AddToTopMenu: %d", res);
LogToFile(logFile, temp);
LogToFile(logFile, "Added Ban option to admin menu");
#else
AddToTopMenu(hTopMenu,
"sm_ban", // Name
Expand Down Expand Up @@ -692,8 +693,8 @@ public AdminMenu_Ban(Handle:topmenu,
#endif
if (action == TopMenuAction_DisplayOption) // We are only being displayed, We only need to show the option name
{
//Format(buffer, maxlength, "%T", "Ban player", param);
Format(buffer, maxlength, "Ban player", param); // Show the menu option
Format(buffer, maxlength, "%T", "Ban player", param);
//Format(buffer, maxlength, "Ban player", param); // Show the menu option
#if defined DEBUG
LogToFile(logFile, "AdminMenu_Ban() -> Formatted the Ban option text");
#endif
Expand Down Expand Up @@ -730,21 +731,12 @@ public ReasonSelected(Handle:menu, MenuAction:action, param1, param2)
if(g_BanTarget[param1] != -1 && g_BanTime[param1] != -1)
PrepareBan(param1, g_BanTarget[param1], g_BanTime[param1], info, sizeof(info));

} else if (action == MenuAction_Cancel && param2 == MenuCancel_Disconnected) {

new Handle:Pack = PlayerDataPack[param1];

if(Pack != INVALID_HANDLE)
}
else if (action == MenuAction_Cancel && param2 == MenuCancel_Disconnected)
{
if(PlayerDataPack[param1] != INVALID_HANDLE)
{
SetPackPosition(Pack, 40);
new Handle:ReasonPack = Handle:ReadPackCell(Pack);

if(ReasonPack != INVALID_HANDLE)
{
CloseHandle(ReasonPack);
}

CloseHandle(Pack);
CloseHandle(PlayerDataPack[param1]);
PlayerDataPack[param1] = INVALID_HANDLE;
}

Expand Down Expand Up @@ -866,9 +858,9 @@ stock DisplayBanTargetMenu(client)
new Handle:menu = CreateMenu(MenuHandler_BanPlayerList);// Create a new menu, pass it the handler.

decl String:title[100];
//Format(title, sizeof(title), "%T:", "Ban player", client);
Format(title, sizeof(title), "%T:", "Ban player", client);

Format(title, sizeof(title), "Ban player", client); // Create the title of the menu
//Format(title, sizeof(title), "Ban player", client); // Create the title of the menu
SetMenuTitle(menu, title); // Set the title
SetMenuExitBackButton(menu, true); // Yes we want back/exit

Expand All @@ -889,8 +881,8 @@ stock DisplayBanTimeMenu(client)
new Handle:menu = CreateMenu(MenuHandler_BanTimeList);

decl String:title[100];
//Format(title, sizeof(title), "%T:", "Ban player", client);
Format(title, sizeof(title), "Ban player", client);
Format(title, sizeof(title), "%T:", "Ban player", client);
//Format(title, sizeof(title), "Ban player", client);
SetMenuTitle(menu, title);
SetMenuExitBackButton(menu, true);

Expand Down Expand Up @@ -1346,9 +1338,9 @@ public ProcessQueueCallback(Handle:owner, Handle:hndl, const String:error[], any
SQL_FetchString(hndl, 5, ip, sizeof(ip));
SQL_FetchString(hndl, 6, adminAuth, sizeof(adminAuth));
SQL_FetchString(hndl, 7, adminIp, sizeof(adminIp));
SQL_EscapeString(Database, name, banName, sizeof(banName));
SQL_EscapeString(Database, reason, banReason, sizeof(banReason));
if(startTime + time * 60 > GetTime())
SQL_EscapeString(SQLiteDB, name, banName, sizeof(banName));
SQL_EscapeString(SQLiteDB, reason, banReason, sizeof(banReason));
if(startTime + time * 60 > GetTime() || time == 0)
{
// This ban is still valid and should be entered into the db
if( serverID == -1 )
Expand All @@ -1363,7 +1355,7 @@ public ProcessQueueCallback(Handle:owner, Handle:hndl, const String:error[], any
{
FormatEx(query, sizeof(query),
"INSERT INTO %s_bans (ip, authid, name, created, ends, length, reason, aid, adminIp, sid) VALUES \
('%s', '%s', '%s', %d, %d, %d, '%s', (SELECT aid FROM %s_admins WHERE authid REGEXP '^STEAM_[0-9]:%s$'), '%s', \
('%s', '%s', '%s', %d, %d, %d, '%s', (SELECT aid FROM %s_admins WHERE authid = '%s' OR authid REGEXP '^STEAM_[0-9]:%s$'), '%s', \
%d)",
DatabasePrefix, ip, auth, banName, startTime, startTime + time * 60, time * 60, banReason, DatabasePrefix, adminAuth, adminAuth[8], adminIp, serverID);
}
Expand All @@ -1372,7 +1364,7 @@ public ProcessQueueCallback(Handle:owner, Handle:hndl, const String:error[], any
ResetPack(authPack);
SQL_TQuery(Database, AddedFromSQLiteCallback, query, authPack);
} else {
// The ban is no longer valid and shuld be deleted from the queue
// The ban is no longer valid and should be deleted from the queue
FormatEx(query, sizeof(query), "DELETE FROM queue WHERE steam_id = '%s'", auth);
SQL_TQuery(SQLiteDB, ErrorCheckCallback, query);
}
Expand Down Expand Up @@ -2228,4 +2220,4 @@ stock ResetSettings()
ReadConfig();
}

//Yarr!
//Yarr!
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@
{
"en" "Please type the reason for ban in chat and press enter. Type '!noreason' to abort."
"nl" "Typ alstublieft de reden voor de ban in chat and druk op enter. Typ '!noreason' om the annuleren."
"fr" "Prière d'ecrire la raison du ban dans le chat et appuyez sur la touche Enter. Tapez '!noreason' pour annuler."
"fr" "Prière d'ecrire la raison du ban dans le chat. Tapez '!noreason' pour annuler."
"pl" "Proszę wpisać powód bana w czacie oraz potwierdzić przyciskiem Enter. Wpisz !noreason by anulować."
"de" "Bitte schreiben Sie den Grund für den Ban in den Chat und drücken Sie die Eingabe Taste. Schreiben Sie '!noreason' um abzubrechen."
"de" "Bitte schreiben Sie den Grund für den Ban in den Chat. Schreiben Sie '!noreason' um abzubrechen."
"ru" "Пожалуйста, введите причину блокировке в зоне чата и нажмите Enter. наберите '!noreason' для предотвращения процедуры."
}
"Chat Reason Aborted"
Expand Down
Loading

0 comments on commit 694ba3a

Please sign in to comment.