diff --git a/amxmodx/AMBuilder b/amxmodx/AMBuilder index 16125cdc..1665ec89 100644 --- a/amxmodx/AMBuilder +++ b/amxmodx/AMBuilder @@ -94,6 +94,8 @@ binary.sources = [ 'CDataPack.cpp', 'datapacks.cpp', 'stackstructs.cpp', + 'CTextParsers.cpp', + 'textparse.cpp', ] if builder.target_platform == 'windows': diff --git a/amxmodx/CCmd.cpp b/amxmodx/CCmd.cpp index 803fd860..992a8765 100755 --- a/amxmodx/CCmd.cpp +++ b/amxmodx/CCmd.cpp @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #include "amxmodx.h" #include "CCmd.h" diff --git a/amxmodx/CCmd.h b/amxmodx/CCmd.h index 4034c15c..463e25a2 100755 --- a/amxmodx/CCmd.h +++ b/amxmodx/CCmd.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef COMMANDS_H #define COMMANDS_H diff --git a/amxmodx/CDataPack.cpp b/amxmodx/CDataPack.cpp index 8e6c45b7..658e8484 100644 --- a/amxmodx/CDataPack.cpp +++ b/amxmodx/CDataPack.cpp @@ -25,8 +25,6 @@ * this exception to all derivative works. AlliedModders LLC defines further * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), * or . - * - * Version: $Id$ */ #include diff --git a/amxmodx/CDataPack.h b/amxmodx/CDataPack.h index 491b2920..618680d7 100644 --- a/amxmodx/CDataPack.h +++ b/amxmodx/CDataPack.h @@ -25,8 +25,6 @@ * this exception to all derivative works. AlliedModders LLC defines further * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), * or . - * - * Version: $Id$ */ #ifndef _INCLUDE_SOURCEMOD_CDATAPACK_H_ diff --git a/amxmodx/CEvent.cpp b/amxmodx/CEvent.cpp index 4ae1cb57..da5e8c2f 100755 --- a/amxmodx/CEvent.cpp +++ b/amxmodx/CEvent.cpp @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #include "amxmodx.h" #include "CEvent.h" diff --git a/amxmodx/CEvent.h b/amxmodx/CEvent.h index 0dbf7afb..5ab0e785 100755 --- a/amxmodx/CEvent.h +++ b/amxmodx/CEvent.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef __CEVENTS_H__ #define __CEVENTS_H__ diff --git a/amxmodx/CFile.cpp b/amxmodx/CFile.cpp index 02b546a7..c8da0a9c 100755 --- a/amxmodx/CFile.cpp +++ b/amxmodx/CFile.cpp @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #include #include "amxmodx.h" diff --git a/amxmodx/CFile.h b/amxmodx/CFile.h index bf49d441..b1428d90 100755 --- a/amxmodx/CFile.h +++ b/amxmodx/CFile.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #include #include "CString.h" diff --git a/amxmodx/CFlagManager.cpp b/amxmodx/CFlagManager.cpp index 3f4063a3..dfd2ef19 100644 --- a/amxmodx/CFlagManager.cpp +++ b/amxmodx/CFlagManager.cpp @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include #include #include diff --git a/amxmodx/CFlagManager.h b/amxmodx/CFlagManager.h index ec085726..fd49c700 100644 --- a/amxmodx/CFlagManager.h +++ b/amxmodx/CFlagManager.h @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #ifndef CFLAGMANAGER_H #define CFLAGMANAGER_H diff --git a/amxmodx/CForward.cpp b/amxmodx/CForward.cpp index 1adb6acb..ab24f5cc 100755 --- a/amxmodx/CForward.cpp +++ b/amxmodx/CForward.cpp @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #include "amxmodx.h" #include "debugger.h" diff --git a/amxmodx/CForward.h b/amxmodx/CForward.h index 02c36174..f58525e6 100755 --- a/amxmodx/CForward.h +++ b/amxmodx/CForward.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license /* CForward.h diff --git a/amxmodx/CLang.cpp b/amxmodx/CLang.cpp index 4f30c730..6b04a52b 100755 --- a/amxmodx/CLang.cpp +++ b/amxmodx/CLang.cpp @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #include #include "amxmodx.h" diff --git a/amxmodx/CLang.h b/amxmodx/CLang.h index a6aea58e..98863af6 100755 --- a/amxmodx/CLang.h +++ b/amxmodx/CLang.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef _INCLUDE_CLANG_H #define _INCLUDE_CLANG_H diff --git a/amxmodx/CList.h b/amxmodx/CList.h index fe906765..01dc5363 100755 --- a/amxmodx/CList.h +++ b/amxmodx/CList.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef CLIST_H #define CLIST_H diff --git a/amxmodx/CLogEvent.cpp b/amxmodx/CLogEvent.cpp index ca9b5e63..7b9c487a 100755 --- a/amxmodx/CLogEvent.cpp +++ b/amxmodx/CLogEvent.cpp @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #include "amxmodx.h" #include "CLogEvent.h" diff --git a/amxmodx/CLogEvent.h b/amxmodx/CLogEvent.h index 43241bd3..937d675b 100755 --- a/amxmodx/CLogEvent.h +++ b/amxmodx/CLogEvent.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef LOGEVENTS_H #define LOGEVENTS_H diff --git a/amxmodx/CMenu.cpp b/amxmodx/CMenu.cpp index c372fcc1..a3d323db 100755 --- a/amxmodx/CMenu.cpp +++ b/amxmodx/CMenu.cpp @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #include "amxmodx.h" #include "CMenu.h" diff --git a/amxmodx/CMenu.h b/amxmodx/CMenu.h index 860e55a5..1df6c257 100755 --- a/amxmodx/CMenu.h +++ b/amxmodx/CMenu.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef MENUS_H #define MENUS_H diff --git a/amxmodx/CMisc.cpp b/amxmodx/CMisc.cpp index e1990618..b6a29b8e 100755 --- a/amxmodx/CMisc.cpp +++ b/amxmodx/CMisc.cpp @@ -1,33 +1,12 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include "amxmodx.h" #include "newmenus.h" // ***************************************************** diff --git a/amxmodx/CMisc.h b/amxmodx/CMisc.h index 8e20d1f1..851ccc36 100755 --- a/amxmodx/CMisc.h +++ b/amxmodx/CMisc.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef CMISC_H #define CMISC_H diff --git a/amxmodx/CModule.cpp b/amxmodx/CModule.cpp index 12c2c54a..2ff50384 100755 --- a/amxmodx/CModule.cpp +++ b/amxmodx/CModule.cpp @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #include "amxmodx.h" #include "libraries.h" diff --git a/amxmodx/CModule.h b/amxmodx/CModule.h index 32b80d62..dbdd856f 100755 --- a/amxmodx/CModule.h +++ b/amxmodx/CModule.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license // ***************************************************** // class CModule diff --git a/amxmodx/CPlugin.cpp b/amxmodx/CPlugin.cpp index 958e2cea..5db24c52 100755 --- a/amxmodx/CPlugin.cpp +++ b/amxmodx/CPlugin.cpp @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #include "amxmodx.h" #include "CPlugin.h" diff --git a/amxmodx/CPlugin.h b/amxmodx/CPlugin.h index 3c9b5f88..a52ffd37 100755 --- a/amxmodx/CPlugin.h +++ b/amxmodx/CPlugin.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef PLUGIN_H #define PLUGIN_H diff --git a/amxmodx/CQueue.h b/amxmodx/CQueue.h index fbb8f8b1..eaec18bb 100755 --- a/amxmodx/CQueue.h +++ b/amxmodx/CQueue.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license //by David "BAILOPAN" Anderson #ifndef _INCLUDE_CQUEUE_H diff --git a/amxmodx/CString.h b/amxmodx/CString.h index fc59b1a6..d59dffda 100755 --- a/amxmodx/CString.h +++ b/amxmodx/CString.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef _INCLUDE_CSTRING_H #define _INCLUDE_CSTRING_H diff --git a/amxmodx/CTask.cpp b/amxmodx/CTask.cpp index d5e9b59c..94de96ff 100755 --- a/amxmodx/CTask.cpp +++ b/amxmodx/CTask.cpp @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #include "amxmodx.h" #include "CTask.h" diff --git a/amxmodx/CTask.h b/amxmodx/CTask.h index ee04a4c3..4eb83af9 100755 --- a/amxmodx/CTask.h +++ b/amxmodx/CTask.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef CTASK_H #define CTASK_H diff --git a/amxmodx/CTextParsers.cpp b/amxmodx/CTextParsers.cpp new file mode 100644 index 00000000..3d508899 --- /dev/null +++ b/amxmodx/CTextParsers.cpp @@ -0,0 +1,1130 @@ +/** +* vim: set ts=4 : +* ============================================================================= +* SourceMod +* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. +* ============================================================================= +* +* This program is free software; you can redistribute it and/or modify it under +* the terms of the GNU General Public License, version 3.0, as published by the +* Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +* details. +* +* You should have received a copy of the GNU General Public License along with +* this program. If not, see . +* +* As a special exception, AlliedModders LLC gives you permission to link the +* code of this program (as well as its derivative works) to "Half-Life 2," the +* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software +* by the Valve Corporation. You must obey the GNU General Public License in +* all respects for all other code used. Additionally, AlliedModders LLC grants +* this exception to all derivative works. AlliedModders LLC defines further +* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), +* or . +* +* Version: $Id$ +*/ +#include "amxmodx.h" +#include "CTextParsers.h" +/* +#include +#include +#include +#include +#include +#include */ + +#include + +TextParsers g_TextParser; +ITextParsers *textparsers = &g_TextParser; + +static int g_ini_chartable1[255] = { 0 }; +static int g_ws_chartable[255] = { 0 }; + +bool TextParsers::IsWhitespace(const char *stream) +{ + return g_ws_chartable[(unsigned char)*stream] == 1; +} + +TextParsers::TextParsers() +{ + g_ini_chartable1[(unsigned)'_'] = 1; + g_ini_chartable1[(unsigned)'-'] = 1; + g_ini_chartable1[(unsigned)','] = 1; + g_ini_chartable1[(unsigned)'+'] = 1; + g_ini_chartable1[(unsigned)'.'] = 1; + g_ini_chartable1[(unsigned)'$'] = 1; + g_ini_chartable1[(unsigned)'?'] = 1; + g_ini_chartable1[(unsigned)'/'] = 1; + g_ws_chartable[(unsigned)'\n'] = 1; + g_ws_chartable[(unsigned)'\v'] = 1; + g_ws_chartable[(unsigned)'\r'] = 1; + g_ws_chartable[(unsigned)'\t'] = 1; + g_ws_chartable[(unsigned)'\f'] = 1; + g_ws_chartable[(unsigned)' '] = 1; +} + +/* +void TextParsers::OnSourceModAllInitialized() +{ + sharesys->AddInterface(NULL, this); +}*/ + +unsigned int TextParsers::GetUTF8CharBytes(const char *stream) +{ + return _GetUTF8CharBytes(stream); +} + +/** +* File streams +*/ + +bool FileStreamReader(void *stream, char *buffer, size_t maxlength, unsigned int *read) +{ + size_t num = fread(buffer, 1, maxlength, (FILE *)stream); + + *read = static_cast(num); + + if (num == 0 && feof((FILE *)stream)) + { + return true; + } + + return (ferror((FILE *)stream) == 0); +} + +SMCError TextParsers::ParseFile_SMC(const char *file, ITextListener_SMC *smc, SMCStates *states) +{ + FILE *fp = fopen(file, "rt"); + + if (!fp) + { + if (states != NULL) + { + states->line = 0; + states->col = 0; + } + return SMCError_StreamOpen; + } + + SMCError result = ParseStream_SMC(fp, FileStreamReader, smc, states); + + fclose(fp); + + return result; +} + +SMCError TextParsers::ParseSMCFile(const char *file, + ITextListener_SMC *smc_listener, + SMCStates *states, + char *buffer, + size_t maxsize) +{ + const char *errstr; + FILE *fp = fopen(file, "rt"); + + if (fp == NULL) + { + char error[256] = "unknown"; + if (states != NULL) + { + states->line = 0; + states->col = 0; + } + /*libsys->GetPlatformError(error, sizeof(error));*/ + UTIL_Format(buffer, maxsize, "File could not be opened: %s", error); + return SMCError_StreamOpen; + } + + SMCError result = ParseStream_SMC(fp, FileStreamReader, smc_listener, states); + + fclose(fp); + + errstr = GetSMCErrorString(result); + UTIL_Format(buffer, maxsize, "%s", errstr != NULL ? errstr : "Unknown error"); + + return result; +} + +struct RawStream +{ + const char *stream; + size_t length; + size_t pos; +}; + +bool RawStreamReader(void *stream, char *buffer, size_t maxlength, unsigned int *read) +{ + RawStream *rs = (RawStream *)stream; + + if (rs->pos >= rs->length) + { + return false; + } + + size_t remaining = rs->length - rs->pos; + + /* Use the smaller of the two */ + size_t copy = (remaining > maxlength) ? maxlength : remaining; + + memcpy(buffer, &rs->stream[rs->pos], copy); + rs->pos += copy; + *read = copy; + assert(rs->pos <= rs->length); + + return true; +} + +SMCError TextParsers::ParseSMCStream(const char *stream, + size_t length, + ITextListener_SMC *smc_listener, + SMCStates *states, + char *buffer, + size_t maxsize) +{ + RawStream rs; + SMCError result; + + rs.stream = stream; + rs.length = length; + rs.pos = 0; + + result = ParseStream_SMC(&rs, RawStreamReader, smc_listener, states); + + const char *errstr = GetSMCErrorString(result); + UTIL_Format(buffer, maxsize, "%s", errstr != NULL ? errstr : "Unknown error"); + + return result; +} + +/** +* Raw parsing of streams with helper functions +*/ + +struct StringInfo +{ + StringInfo() : quoted(false), ptr(NULL), end(NULL), special(false) { } + bool quoted; + char *ptr; + char *end; + bool special; +}; + +const char *FixupString(StringInfo &data) +{ + if (!data.ptr) + { + return NULL; + } + + if (data.quoted) + { + data.ptr++; + } +#if defined _DEBUG + else { + /* A string will never have beginning whitespace because we ignore it in the stream. + * Furthermore, if there is trailing whitespace, the end ptr will point to it, so it is valid + * to overwrite! Lastly, the last character must be whitespace or a comment/invalid character. + */ + } +#endif + + /* Do some extra work on strings that have special quoted characters. */ + if (data.special) + { + char *outptr = data.ptr; + size_t len = data.end - data.ptr; + if (len >= 2) + { + for (size_t i = 0; i= 0; i--) + { + if (info[i].ptr) + { + return info[i].ptr; + } + } + + return NULL; +} + +SMCError TextParsers::ParseStream_SMC(void *stream, + STREAMREADER srdr, + ITextListener_SMC *smc, + SMCStates *pStates) +{ + char *reparse_point = NULL; + char in_buf[4096]; + char *parse_point = in_buf; + char *line_begin = in_buf; + unsigned int read; + unsigned int curlevel = 0; + bool in_quote = false; + bool ignoring = false; + bool eol_comment = false; + bool ml_comment = false; + unsigned int i; + SMCError err = SMCError_Okay; + SMCResult res; + SMCStates states; + char c; + + StringInfo strings[3]; + StringInfo emptystring; + + states.line = 1; + states.col = 0; + + smc->ReadSMC_ParseStart(); + + /** + * The stream reader reads in as much as it can fill the buffer with. + * It then processes the buffer. If the buffer cannot be fully processed, for example, + * a line is left hanging with no newline, then the contents of the buffer is shifted + * down, and the buffer is filled from the stream reader again. + * + * What makes this particularly annoying is that we cache pointers everywhere, so when + * the shifting process takes place, all those pointers must be shifted as well. + */ + while (srdr(stream, parse_point, sizeof(in_buf)-(parse_point - in_buf) - 1, &read)) + { + if (!read) + { + break; + } + + /* Check for BOM markings, which is only relevant on the first line. + * Not worth it, but it could be moved out of the loop. + */ + if (states.line == 1 && + in_buf[0] == (char)0xEF && + in_buf[1] == (char)0xBB && + in_buf[2] == (char)0xBF) + { + /* Move EVERYTHING down :\ */ + memmove(in_buf, &in_buf[3], read - 3); + read -= 3; + } + + if (reparse_point) + { + read += (parse_point - reparse_point); + parse_point = reparse_point; + reparse_point = NULL; + } + + for (i = 0; iReadSMC_RawLine(&states, line_begin)) != SMCResult_Continue) + { + err = (res == SMCResult_HaltFail) ? SMCError_Custom : SMCError_Okay; + goto failed; + } + parse_point[i] = '\n'; + + /* Now we check the sanity of our staged strings! */ + if (strings[2].ptr) + { + if (!curlevel) + { + err = SMCError_InvalidProperty1; + goto failed; + } + /* Assume the next string is a property and pass the info on. */ + if ((res = smc->ReadSMC_KeyValue( + &states, + FixupString(strings[2]), + FixupString(strings[1]))) != SMCResult_Continue) + { + err = (res == SMCResult_HaltFail) ? SMCError_Custom : SMCError_Okay; + goto failed; + } + scrap(strings); + } + + /* Change the states for the next line */ + states.col = 0; + states.line++; + line_begin = &parse_point[i + 1]; //Note: safe because this gets relocated later + } + else if (ignoring) + { + if (in_quote) + { + /* If i was 0, we could have reparsed, so make sure there's no buffer underrun */ + if ((&parse_point[i] != in_buf) && c == '"' && parse_point[i - 1] != '\\') + { + /* If we reached a quote in an ignore phase, + * we're staging a string and we must rotate it out. + */ + in_quote = false; + ignoring = false; + /* Set our info */ + strings[0].end = &parse_point[i]; + strings[0].quoted = true; + if (rotate(strings) != NULL) + { + /* If we rotated too many strings, there was too much crap on one line */ + err = SMCError_InvalidTokens; + goto failed; + } + } + else if (c == '\\') + { + strings[0].special = true; + if (i == (read - 1)) + { + reparse_point = &parse_point[i]; + break; + } + } + } + else if (ml_comment) + { + if (c == '*') + { + /* Check if we need to get more input first */ + if (i == read - 1) + { + reparse_point = &parse_point[i]; + break; + } + if (parse_point[i + 1] == '/') + { + ml_comment = false; + ignoring = false; + /* We should not be staging anything right now. */ + assert(strings[0].ptr == NULL); + /* Advance the input stream so we don't choke on this token */ + i++; + states.col++; + } + } + } + } + else + { + /* Check if we're whitespace or not */ + if (!g_ws_chartable[(unsigned char)c]) + { + bool restage = false; + /* Check various special tokens: + * ; + * // + * / * + * { + * } + */ + if (c == ';' || c == '/') + { + /* If it's a line-based comment (that is, ; or //) + * we will need to scrap everything until the end of the line. + */ + if (c == '/') + { + if (i == read - 1) + { + /* If we reached the end of the look-ahead, we need to re-check our input. + * Breaking out will force this to be the new reparse point! + */ + reparse_point = &parse_point[i]; + break; + } + if (parse_point[i + 1] == '/') + { + /* standard comment */ + ignoring = true; + eol_comment = true; + restage = true; + } + else if (parse_point[i + 1] == '*') + { + /* inline comment - start ignoring */ + ignoring = true; + ml_comment = true; + /* yes, we restage, meaning that: + * STR/ *stuff* /ING (space because ml comments don't nest in C++) + * will not generate 'STRING', but rather 'STR' and 'ING'. + * This should be a rare occurrence and is done here for convenience. + */ + restage = true; + } + } + else + { + ignoring = true; + eol_comment = true; + restage = true; + } + } + else if (c == '{') + { + /* If we are staging a string, we must rotate here */ + if (strings[0].ptr) + { + /* We have unacceptable tokens on this line */ + if (rotate(strings) != NULL) + { + err = SMCError_InvalidSection1; + goto failed; + } + } + /* Sections must always be alone */ + if (strings[2].ptr != NULL) + { + err = SMCError_InvalidSection1; + goto failed; + } + else if (strings[1].ptr == NULL) + { + err = SMCError_InvalidSection2; + goto failed; + } + if ((res = smc->ReadSMC_NewSection(&states, FixupString(strings[1]))) + != SMCResult_Continue) + { + err = (res == SMCResult_HaltFail) ? SMCError_Custom : SMCError_Okay; + goto failed; + } + strings[1] = emptystring; + curlevel++; + } + else if (c == '}') + { + /* Unlike our matching friend, this can be on the same line as something prior */ + if (rotate(strings) != NULL) + { + err = SMCError_InvalidSection3; + goto failed; + } + if (strings[2].ptr) + { + if (!curlevel) + { + err = SMCError_InvalidProperty1; + goto failed; + } + if ((res = smc->ReadSMC_KeyValue( + &states, + FixupString(strings[2]), + FixupString(strings[1]))) + != SMCResult_Continue) + { + err = (res == SMCResult_HaltFail) ? SMCError_Custom : SMCError_Okay; + goto failed; + } + } + else if (strings[1].ptr) + { + err = SMCError_InvalidSection3; + goto failed; + } + else if (!curlevel) + { + err = SMCError_InvalidSection4; + goto failed; + } + /* Now it's safe to leave the section */ + scrap(strings); + if ((res = smc->ReadSMC_LeavingSection(&states)) != SMCResult_Continue) + { + err = (res == SMCResult_HaltFail) ? SMCError_Custom : SMCError_Okay; + goto failed; + } + curlevel--; + } + else if (c == '"') + { + /* If we get a quote mark, we always restage, but we need to do it beforehand */ + if (strings[0].ptr) + { + strings[0].end = &parse_point[i]; + if (rotate(strings) != NULL) + { + err = SMCError_InvalidTokens; + goto failed; + } + } + strings[0].ptr = &parse_point[i]; + in_quote = true; + ignoring = true; + } + else if (!strings[0].ptr) + { + /* If we have no string, we must start one */ + strings[0].ptr = &parse_point[i]; + } + if (restage && strings[0].ptr) + { + strings[0].end = &parse_point[i]; + if (rotate(strings) != NULL) + { + err = SMCError_InvalidTokens; + goto failed; + } + } + } + else + { + /* If we're eating a string and get whitespace, we need to restage. + * (Note that if we are quoted, this is being ignored) + */ + if (strings[0].ptr) + { + /* + * The specification says the second string in a pair does not need to be quoted. + * Thus, we check if there's already a string on the stack. + * If there's a newline, we always rotate so the newline has an empty starter. + */ + if (!strings[1].ptr) + { + /* There's no string, so we must move this one down and eat up another */ + strings[0].end = &parse_point[i]; + rotate(strings); + } + else if (!strings[1].quoted) + { + err = SMCError_InvalidTokens; + goto failed; + } + } + } + } + + /* Advance which token we're on */ + states.col++; + } + + if (line_begin != in_buf) + { + /* The line buffer has advanced, so it's safe to copy N bytes back to the beginning. + * What's N? N is the lowest point we're currently relying on. + */ + char *stage = lowstring(strings); + if (!stage || stage > line_begin) + { + stage = line_begin; + } + unsigned int bytes = read - (stage - parse_point); + + /* It is now safe to delete everything before the staged point */ + memmove(in_buf, stage, bytes); + + /* Calculate the number of bytes in the new buffer */ + bytes = stage - in_buf; + /* Relocate all the cached pointers to our new base */ + line_begin -= bytes; + reloc(strings[0], bytes); + reloc(strings[1], bytes); + reloc(strings[2], bytes); + if (reparse_point) + { + reparse_point -= bytes; + } + if (parse_point) + { + parse_point = &parse_point[read]; + parse_point -= bytes; + } + } + else if (read == sizeof(in_buf)-1) + { + err = SMCError_TokenOverflow; + goto failed; + } + } + + /* If we're done parsing and there are tokens left over... */ + if (curlevel) + { + err = SMCError_InvalidSection5; + goto failed; + } + else if (strings[0].ptr || strings[1].ptr) + { + err = SMCError_InvalidTokens; + goto failed; + } + + smc->ReadSMC_ParseEnd(false, false); + + if (pStates != NULL) + { + *pStates = states; + } + + return SMCError_Okay; + +failed: + if (pStates != NULL) + { + *pStates = states; + } + + smc->ReadSMC_ParseEnd(true, (err == SMCError_Custom)); + + return err; +} + + +/** +* INI parser +*/ + +bool TextParsers::ParseFile_INI(const char *file, ITextListener_INI *ini_listener, unsigned int *line, unsigned int *col) +{ + FILE *fp = fopen(file, "rt"); + unsigned int curline = 0; + unsigned int curtok; + size_t len; + + if (!fp) + { + if (line) + { + *line = 0; + } + + return false; + } + + ini_listener->ReadINI_ParseStart(); + + char buffer[2048]; + char *ptr, *save_ptr; + bool in_quote; + + while (!feof(fp)) + { + curline++; + curtok = 0; + buffer[0] = '\0'; + if (fgets(buffer, sizeof(buffer), fp) == NULL) + { + break; + } + + //:TODO: this will only run once, so find a nice way to move it out of the while loop + /* If this is the first line, check the first three bytes for BOM */ + if (curline == 1 && + buffer[0] == (char)0xEF && + buffer[1] == (char)0xBB && + buffer[2] == (char)0xBF) + { + /* We have a UTF-8 marked file... skip these bytes */ + ptr = &buffer[3]; + } + else { + ptr = buffer; + } + + /*************************************************** + * We preprocess the string before parsing tokens! * + ***************************************************/ + + /* First strip beginning whitespace */ + while (*ptr != '\0' && g_ws_chartable[(unsigned char)*ptr] != 0) + { + ptr++; + } + + len = strlen(ptr); + + if (!len) + { + continue; + } + + /* Now search for comment characters */ + in_quote = false; + save_ptr = ptr; + for (size_t i = 0; iReadINI_RawLine(ptr, &curtok)) + { + goto event_failed; + } + + if (*ptr == '[') + { + bool invalid_tokens = false; + bool got_bracket = false; + bool extra_tokens = false; + char c; + bool alnum; + wchar_t wc; + + for (size_t i = 1; iReadINI_NewSection(&ptr[1], invalid_tokens, got_bracket, extra_tokens, &curtok)) + { + goto event_failed; + } + } + else { + char *key_ptr = ptr; + char *val_ptr = NULL; + char c; + size_t first_space = 0; + bool invalid_tokens = false; + bool equal_token = false; + bool quotes = false; + bool alnum; + wchar_t wc; + + for (size_t i = 0; iReadINI_KeyValue(key_ptr, val_ptr, invalid_tokens, equal_token, quotes, &curtok)) + { + curtok = 0; + goto event_failed; + } + } + } + + if (line) + { + *line = curline; + } + + if (col) + { + *col = curtok; + } + + fclose(fp); + + ini_listener->ReadINI_ParseEnd(false); + + return true; + +event_failed: + if (line) + { + *line = curline; + } + + if (col) + { + *col = curtok; + } + + fclose(fp); + + ini_listener->ReadINI_ParseEnd(true); + + return false; +} + +const char *TextParsers::GetSMCErrorString(SMCError err) +{ + static const char *s_errors[] = + { + NULL, + "Stream failed to open", + "Stream returned read error", + NULL, + "Un-quoted section has invalid tokens", + "Section declared without header", + "Section declared with unknown tokens", + "Section ending without a matching section beginning", + "Section beginning without a matching ending", + "Line contained too many invalid tokens", + "Token buffer overflowed", + "A property was declared outside of a section", + }; + + if (err < SMCError_Okay || err > SMCError_InvalidProperty1) + { + return NULL; + } + + return s_errors[err]; +} diff --git a/amxmodx/CTextParsers.h b/amxmodx/CTextParsers.h new file mode 100644 index 00000000..45ebe52c --- /dev/null +++ b/amxmodx/CTextParsers.h @@ -0,0 +1,90 @@ +/** +* vim: set ts=4 : +* ============================================================================= +* SourceMod +* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. +* ============================================================================= +* +* This program is free software; you can redistribute it and/or modify it under +* the terms of the GNU General Public License, version 3.0, as published by the +* Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +* details. +* +* You should have received a copy of the GNU General Public License along with +* this program. If not, see . +* +* As a special exception, AlliedModders LLC gives you permission to link the +* code of this program (as well as its derivative works) to "Half-Life 2," the +* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software +* by the Valve Corporation. You must obey the GNU General Public License in +* all respects for all other code used. Additionally, AlliedModders LLC grants +* this exception to all derivative works. AlliedModders LLC defines further +* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), +* or . +* +* Version: $Id$ +*/ + +#ifndef _INCLUDE_SOURCEMOD_TEXTPARSERS_H_ +#define _INCLUDE_SOURCEMOD_TEXTPARSERS_H_ + +#include +#include + +using namespace SourceMod; + +/** +* @param void * IN: Stream pointer +* @param char * IN/OUT: Stream buffer +* @param size_t IN: Maximum size of buffer +* @param unsigned int * OUT: Number of bytes read (0 = end of stream) +* @return True on success, false on failure +*/ +typedef bool(*STREAMREADER)(void *, char *, size_t, unsigned int *); + +class TextParsers : public ITextParsers +{ +public: + TextParsers(); +public: + bool ParseFile_INI(const char *file, + ITextListener_INI *ini_listener, + unsigned int *line, + unsigned int *col); + + SMCError ParseFile_SMC(const char *file, + ITextListener_SMC *smc_listener, + SMCStates *states); + + SMCError ParseSMCFile(const char *file, + ITextListener_SMC *smc_listener, + SMCStates *states, + char *buffer, + size_t maxsize); + + SMCError ParseSMCStream(const char *stream, + size_t length, + ITextListener_SMC *smc_listener, + SMCStates *states, + char *buffer, + size_t maxsize); + + unsigned int GetUTF8CharBytes(const char *stream); + + const char *GetSMCErrorString(SMCError err); + bool IsWhitespace(const char *stream); +private: + SMCError ParseStream_SMC(void *stream, + STREAMREADER srdr, + ITextListener_SMC *smc, + SMCStates *states); +}; + +extern TextParsers g_TextParser; + +#endif //_INCLUDE_SOURCEMOD_TEXTPARSERS_H_ + diff --git a/amxmodx/CVault.cpp b/amxmodx/CVault.cpp index 66fd2833..f167276c 100755 --- a/amxmodx/CVault.cpp +++ b/amxmodx/CVault.cpp @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #include #include diff --git a/amxmodx/CVault.h b/amxmodx/CVault.h index 1c759ebc..0751cb72 100755 --- a/amxmodx/CVault.h +++ b/amxmodx/CVault.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef VAULT_CUSTOM_H #define VAULT_CUSTOM_H diff --git a/amxmodx/CVector.h b/amxmodx/CVector.h index 24355d4e..44241413 100755 --- a/amxmodx/CVector.h +++ b/amxmodx/CVector.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef __CVECTOR_H__ #define __CVECTOR_H__ diff --git a/amxmodx/Makefile b/amxmodx/Makefile index fc136574..10aae948 100755 --- a/amxmodx/Makefile +++ b/amxmodx/Makefile @@ -21,7 +21,8 @@ OBJECTS = meta_api.cpp CFile.cpp CVault.cpp vault.cpp float.cpp file.cpp modules CMenu.cpp util.cpp amx.cpp amxdbg.cpp natives.cpp newmenus.cpp debugger.cpp \ optimizer.cpp format.cpp messages.cpp libraries.cpp vector.cpp sorting.cpp \ nongpl_matches.cpp CFlagManager.cpp datastructs.cpp \ - trie_natives.cpp CDataPack.cpp datapacks.cpp stackstructs.cpp + trie_natives.cpp CDataPack.cpp datapacks.cpp stackstructs.cpp \ + CTextParsers.cpp textparse.cpp \ ############################################## ### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ### diff --git a/amxmodx/amx.cpp b/amxmodx/amx.cpp index b351806c..f0a9ad1d 100755 --- a/amxmodx/amx.cpp +++ b/amxmodx/amx.cpp @@ -17,8 +17,6 @@ * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id: amx.cpp 3707 2008-04-14 19:56:31Z sawce $ */ #define AMX_NODYNALOAD diff --git a/amxmodx/amx.h b/amxmodx/amx.h index fb8fe7e6..54fbbfa6 100755 --- a/amxmodx/amx.h +++ b/amxmodx/amx.h @@ -17,8 +17,6 @@ * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id: amx.h 3006 2006-08-28 11:08:18Z dvander $ */ #if defined FREEBSD && !defined __FreeBSD__ diff --git a/amxmodx/amxcore.cpp b/amxmodx/amxcore.cpp index af5ab4e5..2d1352da 100755 --- a/amxmodx/amxcore.cpp +++ b/amxmodx/amxcore.cpp @@ -17,9 +17,8 @@ * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id: amxcore.cpp 1733 2005-07-25 06:03:43Z dvander $ */ + #if defined _UNICODE || defined __UNICODE__ || defined UNICODE # if !defined UNICODE /* for Windows */ # define UNICODE diff --git a/amxmodx/amxdbg.cpp b/amxmodx/amxdbg.cpp index 0cd19ad5..26a60a46 100755 --- a/amxmodx/amxdbg.cpp +++ b/amxmodx/amxdbg.cpp @@ -19,9 +19,8 @@ * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id: amxdbg.cpp 2345 2006-02-10 19:47:09Z faluco $ */ + #include #include #include diff --git a/amxmodx/amxdbg.h b/amxmodx/amxdbg.h index 52d9e1cc..2b503abc 100755 --- a/amxmodx/amxdbg.h +++ b/amxmodx/amxdbg.h @@ -20,8 +20,6 @@ * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id: amxdbg.h 2977 2006-08-27 02:17:18Z damagedsoul $ */ #ifndef AMXDBG_H_INCLUDED diff --git a/amxmodx/amxmodx.cpp b/amxmodx/amxmodx.cpp index 5dec0e6e..02afd2f2 100755 --- a/amxmodx/amxmodx.cpp +++ b/amxmodx/amxmodx.cpp @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #include #include "amxmodx.h" @@ -2574,6 +2552,18 @@ static cell AMX_NATIVE_CALL change_task(AMX *amx, cell *params) return g_tasksMngr.changeTasks(params[1], params[3] ? 0 : amx, flNewTime); } +static cell AMX_NATIVE_CALL change_level(AMX *amx, cell *params) +{ + int length; + const char* new_map = get_amxstring(amx, params[1], 0, length); + + // Same as calling "changelevel" command but will trigger "server_changelevel" AMXX forward as well. + // Filling second param will call "changelevel2" command, but this is not usable in multiplayer game. + g_pEngTable->pfnChangeLevel(new_map, NULL); + + return 1; +} + static cell AMX_NATIVE_CALL task_exists(AMX *amx, cell *params) /* 1 param */ { return g_tasksMngr.taskExists(params[1], params[2] ? 0 : amx); @@ -4838,6 +4828,7 @@ AMX_NATIVE_INFO amxmodx_Natives[] = {"callfunc_push_str", callfunc_push_str}, {"callfunc_push_array", callfunc_push_array}, {"change_task", change_task}, + {"change_level", change_level}, {"client_cmd", client_cmd}, {"client_print", client_print}, {"client_print_color", client_print_color}, diff --git a/amxmodx/amxmodx.h b/amxmodx/amxmodx.h index 87207bf7..6b9973ca 100755 --- a/amxmodx/amxmodx.h +++ b/amxmodx/amxmodx.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef AMXMODX_H #define AMXMODX_H @@ -86,6 +64,7 @@ extern AMX_NATIVE_INFO vector_Natives[]; extern AMX_NATIVE_INFO g_SortNatives[]; extern AMX_NATIVE_INFO g_DataStructNatives[]; extern AMX_NATIVE_INFO g_StackNatives[]; +extern AMX_NATIVE_INFO g_TextParserNatives[]; #if defined(_WIN32) #define DLLOAD(path) (DLHANDLE)LoadLibrary(path) diff --git a/amxmodx/amxtime.cpp b/amxmodx/amxtime.cpp index 13791c42..e0c9535c 100755 --- a/amxmodx/amxtime.cpp +++ b/amxmodx/amxtime.cpp @@ -2,8 +2,6 @@ * * Copyright (c) ITB CompuPhase, 2001-2002 * This file may be freely used. No warranties of any kind. - * - * Version: $Id: amxtime.cpp 2511 2006-04-06 12:56:45Z damagedsoul $ */ #include #include diff --git a/amxmodx/amxxfile.cpp b/amxmodx/amxxfile.cpp index 8283eec5..9ddb9921 100755 --- a/amxmodx/amxxfile.cpp +++ b/amxmodx/amxxfile.cpp @@ -1,32 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #include "amxmodx.h" #include "amxxfile.h" diff --git a/amxmodx/amxxfile.h b/amxmodx/amxxfile.h index e03e34dd..bebd2a02 100755 --- a/amxmodx/amxxfile.h +++ b/amxmodx/amxxfile.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef __AMXXFILE_H__ #define __AMXXFILE_H__ diff --git a/amxmodx/amxxlog.cpp b/amxmodx/amxxlog.cpp index 1e27bdc5..b342c415 100755 --- a/amxmodx/amxxlog.cpp +++ b/amxmodx/amxxlog.cpp @@ -1,32 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license // amxx_logging localinfo: // 0 = no logging diff --git a/amxmodx/amxxlog.h b/amxmodx/amxxlog.h index a9db353f..02527163 100755 --- a/amxmodx/amxxlog.h +++ b/amxmodx/amxxlog.h @@ -1,32 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef __AMXXLOG_H__ #define __AMXXLOG_H__ diff --git a/amxmodx/binlog.cpp b/amxmodx/binlog.cpp index 4d72545e..5febe828 100644 --- a/amxmodx/binlog.cpp +++ b/amxmodx/binlog.cpp @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #if defined BINLOG_ENABLED #include diff --git a/amxmodx/binlog.h b/amxmodx/binlog.h index 616adef7..5c2fac75 100644 --- a/amxmodx/binlog.h +++ b/amxmodx/binlog.h @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #ifndef _INCLUDE_BINLOG_H #define _INCLUDE_BINLOG_H diff --git a/amxmodx/datapacks.cpp b/amxmodx/datapacks.cpp index 1392a62e..82a82034 100644 --- a/amxmodx/datapacks.cpp +++ b/amxmodx/datapacks.cpp @@ -25,8 +25,6 @@ * this exception to all derivative works. AlliedModders LLC defines further * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), * or . - * - * Version: $Id$ */ #include "CDataPack.h" diff --git a/amxmodx/datastructs.cpp b/amxmodx/datastructs.cpp index 84981908..420ca221 100644 --- a/amxmodx/datastructs.cpp +++ b/amxmodx/datastructs.cpp @@ -1,32 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #include "amxmodx.h" #include "datastructs.h" diff --git a/amxmodx/datastructs.h b/amxmodx/datastructs.h index 15b94d53..d72bb147 100644 --- a/amxmodx/datastructs.h +++ b/amxmodx/datastructs.h @@ -1,32 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef DATASTRUCTS_H #define DATASTRUCTS_H diff --git a/amxmodx/debugger.cpp b/amxmodx/debugger.cpp index eb4934c7..b58b6501 100755 --- a/amxmodx/debugger.cpp +++ b/amxmodx/debugger.cpp @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #include "amxmodx.h" #include "debugger.h" diff --git a/amxmodx/debugger.h b/amxmodx/debugger.h index 1cdef2b1..da8d308b 100755 --- a/amxmodx/debugger.h +++ b/amxmodx/debugger.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef _INCLUDE_DEBUGGER_H_ #define _INCLUDE_DEBUGGER_H_ diff --git a/amxmodx/emsg.cpp b/amxmodx/emsg.cpp index 988e456d..3b718851 100755 --- a/amxmodx/emsg.cpp +++ b/amxmodx/emsg.cpp @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #include "amxmodx.h" #include "CMenu.h" diff --git a/amxmodx/fakemeta.cpp b/amxmodx/fakemeta.cpp index f21e9123..b3fc5f13 100755 --- a/amxmodx/fakemeta.cpp +++ b/amxmodx/fakemeta.cpp @@ -1,32 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #include "amxmodx.h" #include "fakemeta.h" diff --git a/amxmodx/fakemeta.h b/amxmodx/fakemeta.h index c3d8795d..0310f8e1 100755 --- a/amxmodx/fakemeta.h +++ b/amxmodx/fakemeta.h @@ -1,32 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef __FAKEMETA_H__ #define __FAKEMETA_H__ diff --git a/amxmodx/file.cpp b/amxmodx/file.cpp index 32d368e8..08108ca0 100755 --- a/amxmodx/file.cpp +++ b/amxmodx/file.cpp @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license // intptr_t #ifdef _MSC_VER diff --git a/amxmodx/format.cpp b/amxmodx/format.cpp index 1d65f788..df5226de 100644 --- a/amxmodx/format.cpp +++ b/amxmodx/format.cpp @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include "amxmodx.h" #include "format.h" #include "datastructs.h" diff --git a/amxmodx/format.h b/amxmodx/format.h index 3b4260ac..42d76f66 100644 --- a/amxmodx/format.h +++ b/amxmodx/format.h @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #ifndef _INCLUDE_FORMATTING_H #define _INCLUDE_FORMATTING_H diff --git a/amxmodx/helpers-x86.asm b/amxmodx/helpers-x86.asm index a2b61820..67b41372 100644 --- a/amxmodx/helpers-x86.asm +++ b/amxmodx/helpers-x86.asm @@ -1,10 +1,11 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; (C)2006 by David "BAILOPAN" Anderson ; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -;;Licensed under the GNU General Public License, version 2 -;;This is a portion of AMX Mod X -;; and is maintained by the AMX Mod X development team. +; vim: set ts=4 sw=4 tw=99 noet ft=nasm: +; +; AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +; Copyright (C) The AMX Mod X Development Team. +; +; This software is licensed under the GNU General Public License, version 3 or higher. +; Additional exceptions apply. For full license details, see LICENSE.txt or visit: +; https://alliedmods.net/amxmodx-license section .text diff --git a/amxmodx/libraries.cpp b/amxmodx/libraries.cpp index 522de44a..5930e26d 100644 --- a/amxmodx/libraries.cpp +++ b/amxmodx/libraries.cpp @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include "libraries.h" #include "sh_list.h" diff --git a/amxmodx/libraries.h b/amxmodx/libraries.h index 69c296e2..29829427 100644 --- a/amxmodx/libraries.h +++ b/amxmodx/libraries.h @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #ifndef _INCLUDE_LIBRARIES_H #define _INCLUDE_LIBRARIES_H diff --git a/amxmodx/messages.cpp b/amxmodx/messages.cpp index f239b47d..498e7fe8 100755 --- a/amxmodx/messages.cpp +++ b/amxmodx/messages.cpp @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include "amxmodx.h" #include "messages.h" diff --git a/amxmodx/messages.h b/amxmodx/messages.h index 9e357ec4..e3d87f06 100755 --- a/amxmodx/messages.h +++ b/amxmodx/messages.h @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #ifndef _MSGS_INCLUDE_H #define _MSGS_INCLUDE_H diff --git a/amxmodx/meta_api.cpp b/amxmodx/meta_api.cpp index 0823c6a7..c54ea4b3 100755 --- a/amxmodx/meta_api.cpp +++ b/amxmodx/meta_api.cpp @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #include @@ -52,6 +30,7 @@ #include #include "trie_natives.h" #include "CDataPack.h" +#include "textparse.h" plugin_info_t Plugin_info = { @@ -417,6 +396,7 @@ int C_Spawn(edict_t *pent) g_TrieHandles.clear(); g_TrieSnapshotHandles.clear(); g_DataPackHandles.clear(); + g_TextParsersHandles.clear(); char map_pluginsfile_path[256]; char prefixed_map_pluginsfile[256]; diff --git a/amxmodx/modules.cpp b/amxmodx/modules.cpp index 357b07c5..3929cb2e 100755 --- a/amxmodx/modules.cpp +++ b/amxmodx/modules.cpp @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #if defined(__linux__) || defined(__APPLE__) #if defined(__linux__) @@ -574,7 +552,8 @@ int set_amxnatives(AMX* amx, char error[128]) amx_Register(amx, trie_Natives, -1); amx_Register(amx, g_DatapackNatives, -1); amx_Register(amx, g_StackNatives, -1); - + amx_Register(amx, g_TextParserNatives, -1); + //we're not actually gonna check these here anymore amx->flags |= AMX_FLAG_PRENIT; diff --git a/amxmodx/modules.h b/amxmodx/modules.h index b05ea597..769ccdb7 100755 --- a/amxmodx/modules.h +++ b/amxmodx/modules.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef __MODULES_H__ #define __MODULES_H__ diff --git a/amxmodx/msvc10/amxmodx_mm.vcxproj b/amxmodx/msvc10/amxmodx_mm.vcxproj index 1da903e8..43b7cb13 100644 --- a/amxmodx/msvc10/amxmodx_mm.vcxproj +++ b/amxmodx/msvc10/amxmodx_mm.vcxproj @@ -306,6 +306,7 @@ + @@ -335,6 +336,7 @@ All + @@ -370,6 +372,7 @@ + @@ -389,6 +392,7 @@ + @@ -401,6 +405,8 @@ + + diff --git a/amxmodx/msvc10/amxmodx_mm.vcxproj.filters b/amxmodx/msvc10/amxmodx_mm.vcxproj.filters index 06c8962c..3b1d4395 100644 --- a/amxmodx/msvc10/amxmodx_mm.vcxproj.filters +++ b/amxmodx/msvc10/amxmodx_mm.vcxproj.filters @@ -177,6 +177,12 @@ Source Files + + Source Files + + + Source Files + @@ -317,6 +323,12 @@ Header Files + + Header Files + + + Header Files + @@ -405,6 +417,12 @@ Pawn Includes + + Pawn Includes + + + Pawn Includes + diff --git a/amxmodx/natives-amd64.asm b/amxmodx/natives-amd64.asm index f7290fbd..2a76112d 100755 --- a/amxmodx/natives-amd64.asm +++ b/amxmodx/natives-amd64.asm @@ -1,13 +1,17 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; (C)2005 by David "BAILOPAN" Anderson ; -; register_native functions for amd64 ;;;;;; -; Based on the concept by Julien "dJeyL" Laurent ; -; Thanks to T(+)rget for pushing me to implement this ; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; vim: set ts=4 sw=4 tw=99 noet ft=nasm: +; +; AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +; Copyright (C) The AMX Mod X Development Team. +; +; This software is licensed under the GNU General Public License, version 3 or higher. +; Additional exceptions apply. For full license details, see LICENSE.txt or visit: +; https://alliedmods.net/amxmodx-license -;;Licensed under the GNU General Public License, version 2 -;;This is a portion of AMX Mod X -;; and is maintained by the AMX Mod X development team. +; +; register_native functions for amd64 +; Based on the concept by Julien "dJeyL" Laurent +; Thanks to T(+)rget for pushing to implement this +; ;;Initializes the global variable diff --git a/amxmodx/natives-x86.asm b/amxmodx/natives-x86.asm index 9632b2b2..9d4a3a1c 100755 --- a/amxmodx/natives-x86.asm +++ b/amxmodx/natives-x86.asm @@ -1,13 +1,17 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; (C)2005 by David "BAILOPAN" Anderson ; -; register_native functions for x86 ;;;;;; -; Based on the concept by Julien "dJeyL" Laurent ; -; Thanks to T(+)rget for pushing me to implement this ; -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; vim: set ts=4 sw=4 tw=99 noet ft=nasm: +; +; AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +; Copyright (C) The AMX Mod X Development Team. +; +; This software is licensed under the GNU General Public License, version 3 or higher. +; Additional exceptions apply. For full license details, see LICENSE.txt or visit: +; https://alliedmods.net/amxmodx-license -;;Licensed under the GNU General Public License, version 2 -;;This is a portion of AMX Mod X -;; and is maintained by the AMX Mod X development team. +; +; register_native functions for x86 +; Based on the concept by Julien "dJeyL" Laurent +; Thanks to T(+)rget for pushing to implement this +; ;;Initializes the global variable diff --git a/amxmodx/natives.cpp b/amxmodx/natives.cpp index 15ba283d..208b042b 100755 --- a/amxmodx/natives.cpp +++ b/amxmodx/natives.cpp @@ -1,32 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #include "amxmodx.h" #include "sh_stack.h" diff --git a/amxmodx/natives.h b/amxmodx/natives.h index 85143ecb..b753b952 100755 --- a/amxmodx/natives.h +++ b/amxmodx/natives.h @@ -1,32 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef _INCLUDE_NATIVES_H #define _INCLUDE_NATIVES_H diff --git a/amxmodx/newmenus.cpp b/amxmodx/newmenus.cpp index 209fca98..6780755c 100755 --- a/amxmodx/newmenus.cpp +++ b/amxmodx/newmenus.cpp @@ -1,32 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #include "amxmodx.h" #include "CMenu.h" diff --git a/amxmodx/newmenus.h b/amxmodx/newmenus.h index 94d79af0..1248bf0f 100755 --- a/amxmodx/newmenus.h +++ b/amxmodx/newmenus.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef _INCLUDE_NEWMENUS_H #define _INCLUDE_NEWMENUS_H diff --git a/amxmodx/nongpl_matches.cpp b/amxmodx/nongpl_matches.cpp index b79267d3..b0d31dd1 100644 --- a/amxmodx/nongpl_matches.cpp +++ b/amxmodx/nongpl_matches.cpp @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include #include "nongpl_matches.h" diff --git a/amxmodx/nongpl_matches.h b/amxmodx/nongpl_matches.h index eec0e4f5..1ea1d2df 100644 --- a/amxmodx/nongpl_matches.h +++ b/amxmodx/nongpl_matches.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef _INCLUDE_AMXMODX_NONGPL_MATCHES_H_ #define _INCLUDE_AMXMODX_NONGPL_MATCHES_H_ diff --git a/amxmodx/optimizer.cpp b/amxmodx/optimizer.cpp index 8bf801f5..98785f90 100644 --- a/amxmodx/optimizer.cpp +++ b/amxmodx/optimizer.cpp @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include #include "optimizer.h" diff --git a/amxmodx/optimizer.h b/amxmodx/optimizer.h index 853d5a04..b94b7a2e 100644 --- a/amxmodx/optimizer.h +++ b/amxmodx/optimizer.h @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #ifndef _INCLUDE_AMXMODX_OPTIMIZER_H #define _INCLUDE_AMXMODX_OPTIMIZER_H diff --git a/amxmodx/sdk/amxxmodule.cpp b/amxmodx/sdk/amxxmodule.cpp index efb933b3..7de02e6e 100755 --- a/amxmodx/sdk/amxxmodule.cpp +++ b/amxmodx/sdk/amxxmodule.cpp @@ -1,36 +1,16 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* Parts Copyright (C) 2001-2003 Will Day -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -* -* Description: AMX Mod X Module Interface Functions -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Parts Copyright (C) 2001-2003 Will Day +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module SDK +// #include #include diff --git a/amxmodx/sdk/amxxmodule.h b/amxmodx/sdk/amxxmodule.h index 3ca8c7b6..6a760b25 100755 --- a/amxmodx/sdk/amxxmodule.h +++ b/amxmodx/sdk/amxxmodule.h @@ -1,7 +1,16 @@ -/* - * AMX Mod X Module Interface Functions - * This file may be freely used -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license +// + +// +// Module SDK +// // prevent double include #ifndef __AMXXMODULE_H__ diff --git a/amxmodx/sdk/moduleconfig.h b/amxmodx/sdk/moduleconfig.h index 34677bec..d7a6453c 100755 --- a/amxmodx/sdk/moduleconfig.h +++ b/amxmodx/sdk/moduleconfig.h @@ -1,4 +1,15 @@ -// Configuration +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module Config +// #ifndef __MODULECONFIG_H__ #define __MODULECONFIG_H__ diff --git a/amxmodx/sorting.cpp b/amxmodx/sorting.cpp index d1830d3c..60e1b339 100644 --- a/amxmodx/sorting.cpp +++ b/amxmodx/sorting.cpp @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include "amxmodx.h" #include #include diff --git a/amxmodx/srvcmd.cpp b/amxmodx/srvcmd.cpp index 018eaa5e..ab3b8e76 100755 --- a/amxmodx/srvcmd.cpp +++ b/amxmodx/srvcmd.cpp @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #include "amxmodx.h" #include @@ -240,33 +218,13 @@ void amx_command() { print_srvconsole("AMX Mod X\n"); print_srvconsole("\n"); - print_srvconsole(" by the AMX Mod X Development Team\n"); - print_srvconsole(" originally developed by OLO\n"); + print_srvconsole(" Based on AMX Mod by Aleksander Naszko (\"OLO\").\n"); + print_srvconsole(" Copyright (C) The AMX Mod X Development Team.\n"); print_srvconsole("\n"); - print_srvconsole("\n"); - print_srvconsole(" This program is free software; you can redistribute it and/or modify it\n"); - print_srvconsole(" under the terms of the GNU General Public License as published by the\n"); - print_srvconsole(" Free Software Foundation; either version 2 of the License, or (at\n"); - print_srvconsole(" your option) any later version.\n"); - print_srvconsole("\n"); - print_srvconsole(" This program is distributed in the hope that it will be useful, but\n"); - print_srvconsole(" WITHOUT ANY WARRANTY; without even the implied warranty of\n"); - print_srvconsole(" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n"); - print_srvconsole(" General Public License for more details.\n"); - print_srvconsole("\n"); - print_srvconsole(" You should have received a copy of the GNU General Public License\n"); - print_srvconsole(" along with this program; if not, write to the Free Software Foundation,\n"); - print_srvconsole(" Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n"); - print_srvconsole("\n"); - print_srvconsole(" In addition, as a special exception, the author gives permission to\n"); - print_srvconsole(" link the code of this program with the Half-Life Game Engine (\"HL\n"); - print_srvconsole(" Engine\") and Modified Game Libraries (\"MODs\") developed by Valve,\n"); - print_srvconsole(" L.L.C (\"Valve\"). You must obey the GNU General Public License in all\n"); - print_srvconsole(" respects for all of the code used other than the HL Engine and MODs\n"); - print_srvconsole(" from Valve. If you modify this file, you may extend this exception\n"); - print_srvconsole(" to your version of the file, but you are not obligated to do so. If\n"); - print_srvconsole(" you do not wish to do so, delete this exception statement from your\n"); - print_srvconsole(" version.\n"); + print_srvconsole(" This software is licensed under the GNU General Public License, version 3 or\n"); + print_srvconsole(" higher. Additional exceptions apply. For full license details, see LICENSE.txt\n"); + print_srvconsole(" or visit:\n"); + print_srvconsole(" https://alliedmods.net/amxmodx-license\n"); print_srvconsole("\n"); } else if (!strcmp(cmd, "\x74\x75\x72\x74\x6C\x65")) // !! Hidden Command :D !! diff --git a/amxmodx/stackstructs.cpp b/amxmodx/stackstructs.cpp index 586412c3..7238c81e 100644 --- a/amxmodx/stackstructs.cpp +++ b/amxmodx/stackstructs.cpp @@ -1,32 +1,11 @@ -/* AMX Mod X - * - * by the AMX Mod X Development Team - * originally developed by OLO - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #include "amxmodx.h" #include "datastructs.h" diff --git a/amxmodx/string.cpp b/amxmodx/string.cpp index 0a8a4622..877d54cb 100755 --- a/amxmodx/string.cpp +++ b/amxmodx/string.cpp @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #include #include "amxmodx.h" diff --git a/amxmodx/textparse.cpp b/amxmodx/textparse.cpp new file mode 100644 index 00000000..d566221a --- /dev/null +++ b/amxmodx/textparse.cpp @@ -0,0 +1,394 @@ +/** + * vim: set ts=4 sw=4 tw=99 noet: + * + * AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). + * Copyright (C) The AMX Mod X Development Team. + * + * This software is licensed under the GNU General Public License, version 3 or higher. + * Additional exceptions apply. For full license details, see LICENSE.txt or visit: + * https://alliedmods.net/amxmodx-license + */ + +#include "amxmodx.h" +#include +#include + +TextParserHandles g_TextParsersHandles; + +cell createParser() +{ + return g_TextParsersHandles.create(); +} + +cell destroyParser(cell *handle) +{ + ParseInfo *p = g_TextParsersHandles.lookup(*handle); + + if (p == NULL) + { + return 0; + } + + if (g_TextParsersHandles.destroy(*handle)) + { + *handle = 0; + return 1; + } + + return 0; +} + + +/** + * SMC CONFIG. + */ + +// native SMCParser:SMC_CreateParser(); +static cell AMX_NATIVE_CALL SMC_CreateParser(AMX *amx, cell *params) +{ + return createParser(); +} + +// native SMC_SetParseStart(SMCParser:handle, const func[]); +static cell AMX_NATIVE_CALL SMC_SetParseStart(AMX *amx, cell *params) +{ + ParseInfo *p = g_TextParsersHandles.lookup(params[1]); + + if (p == NULL) + { + LogError(amx, AMX_ERR_NATIVE, "Invalid SMC parse handle (%d)", params[1]); + return 0; + } + + int length = 0; + const char *funcName = NULL; + + if ((funcName = get_amxstring(amx, params[2], 0, length)) && length) + { + p->parse_start = registerSPForwardByName(amx, funcName, FP_CELL, FP_DONE); + } + + if (p->parse_start == -1) + { + LogError(amx, AMX_ERR_NATIVE, "Function is not present (function \"%s\") (plugin \"%s\")", funcName, g_plugins.findPluginFast(amx)->getName()); + return 0; + } + + return 1; +} + +// native SMC_SetParseEnd(SMCParser:handle, const func[]); +static cell AMX_NATIVE_CALL SMC_SetParseEnd(AMX *amx, cell *params) +{ + ParseInfo *p = g_TextParsersHandles.lookup(params[1]); + + if (p == NULL) + { + LogError(amx, AMX_ERR_NATIVE, "Invalid SMC parse handle (%d)", params[1]); + return 0; + } + + int length = 0; + const char *funcName = NULL; + + if ((funcName = get_amxstring(amx, params[2], 0, length)) && length) + { + p->parse_end = registerSPForwardByName(amx, funcName, FP_CELL, FP_CELL, FP_CELL, FP_DONE); + } + + if (p->parse_end == -1) + { + LogError(amx, AMX_ERR_NATIVE, "Function is not present (function \"%s\") (plugin \"%s\")", funcName, g_plugins.findPluginFast(amx)->getName()); + return 0; + } + + return 1; +} + +// native SMC_SetReaders(SMCParser:smc, const kvFunc[], const nsFunc[] = "", const esFunc[] = ""); +static cell AMX_NATIVE_CALL SMC_SetReaders(AMX *amx, cell *params) +{ + ParseInfo *p = g_TextParsersHandles.lookup(params[1]); + + if (p == NULL) + { + LogError(amx, AMX_ERR_NATIVE, "Invalid SMC parse handle (%d)", params[1]); + return 0; + } + + int kvLength = 0, nsLength = 0, esLength = 0; + const char *funcName = NULL; + + if ((funcName = get_amxstring(amx, params[2], 0, kvLength)) && kvLength) + { + p->key_value = registerSPForwardByName(amx, funcName, FP_CELL, FP_STRING, FP_STRING, FP_DONE); + } + + if (kvLength && (funcName = get_amxstring(amx, params[3], 1, nsLength)) && nsLength) + { + p->new_section = registerSPForwardByName(amx, funcName, FP_CELL, FP_STRING, FP_DONE); + } + + if (kvLength && (funcName = get_amxstring(amx, params[4], 2, esLength)) && esLength) + { + p->end_section = registerSPForwardByName(amx, funcName, FP_CELL, FP_DONE); + } + + if (p->key_value == -1 || (nsLength && p->new_section == -1) || (esLength && p->end_section == -1)) + { + LogError(amx, AMX_ERR_NATIVE, "Function is not present (function \"%s\") (plugin \"%s\")", funcName, g_plugins.findPluginFast(amx)->getName()); + return 0; + } + + return 1; +} + +// native SMC_SetRawLine(SMCParser:handle, const func[]); +static cell AMX_NATIVE_CALL SMC_SetRawLine(AMX *amx, cell *params) +{ + ParseInfo *p = g_TextParsersHandles.lookup(params[1]); + + if (p == NULL) + { + LogError(amx, AMX_ERR_NATIVE, "Invalid SMC parse handle (%d)", params[1]); + return 0; + } + + int length = 0; + const char *funcName = NULL; + + if ((funcName = get_amxstring(amx, params[2], 0, length)) && length) + { + p->raw_line = registerSPForwardByName(amx, funcName, FP_CELL, FP_STRING, FP_CELL, FP_DONE); + } + + if (p->raw_line == -1) + { + LogError(amx, AMX_ERR_NATIVE, "Function is not present (function \"%s\") (plugin \"%s\")", funcName, g_plugins.findPluginFast(amx)->getName()); + return 0; + } + + return 1; +} + +// native SMCError:SMC_ParseFile(SMCParser:handle, const file[], &line = 0, &col = 0); +static cell AMX_NATIVE_CALL SMC_ParseFile(AMX *amx, cell *params) +{ + ParseInfo *p = g_TextParsersHandles.lookup(params[1]); + + if (p == NULL) + { + LogError(amx, AMX_ERR_NATIVE, "Invalid SMC parse handle (%d)", params[1]); + return 0; + } + + int length; + const char *file = build_pathname("%s", get_amxstring(amx, params[2], 0, length)); + + SMCStates states; + SMCError p_err = textparsers->ParseFile_SMC(file, p, &states); + + *get_amxaddr(amx, params[3]) = states.line; + *get_amxaddr(amx, params[4]) = states.col; + + return static_cast(p_err); +} + +// native bool:SMC_GetErrorString(SMCError:error, buffer[], buf_max); +static cell AMX_NATIVE_CALL SMC_GetErrorString(AMX *amx, cell *params) +{ + const char *str = textparsers->GetSMCErrorString((SMCError)params[1]); + + if (!str) + { + return 0; + } + + return set_amxstring(amx, params[2], str, params[3]); +} + +// native SMC_DestroyParser(&SMCParser:handle); +static cell AMX_NATIVE_CALL SMC_DestroyParser(AMX *amx, cell *params) +{ + return destroyParser(get_amxaddr(amx, params[1])); +} + + +/** + * INI CONFIG + */ + +// native INIParser:INI_CreateParser(); +static cell AMX_NATIVE_CALL INI_CreateParser(AMX *amx, cell *params) +{ + return createParser(); +} + +// native bool:INI_ParseFile(INIParser:handle, const file[], &line = 0, &col = 0); +static cell AMX_NATIVE_CALL INI_ParseFile(AMX *amx, cell *params) +{ + ParseInfo *p = g_TextParsersHandles.lookup(params[1]); + + if (p == NULL) + { + LogError(amx, AMX_ERR_NATIVE, "Invalid INI parse handle (%d)", params[1]); + return 0; + } + + int length; + const char *file = build_pathname("%s", get_amxstring(amx, params[2], 0, length)); + + unsigned int line, col; + bool result = textparsers->ParseFile_INI(file, p, &line, &col); + + *get_amxaddr(amx, params[3]) = line; + *get_amxaddr(amx, params[4]) = col; + + return result; +} + +// native INI_SetParseStart(INIParser:handle, const func[]); +static cell AMX_NATIVE_CALL INI_SetParseStart(AMX *amx, cell *params) +{ + ParseInfo *p = g_TextParsersHandles.lookup(params[1]); + + if (p == NULL) + { + LogError(amx, AMX_ERR_NATIVE, "Invalid INI parse handle (%d)", params[1]); + return 0; + } + + int length = 0; + const char *funcName = NULL; + + if ((funcName = get_amxstring(amx, params[2], 0, length)) && length) + { + p->parse_start = registerSPForwardByName(amx, funcName, FP_CELL, FP_DONE); + } + + if (p->parse_start == -1) + { + LogError(amx, AMX_ERR_NATIVE, "Function is not present (function \"%s\") (plugin \"%s\")", funcName, g_plugins.findPluginFast(amx)->getName()); + return 0; + } + + return 1; +} + +// native INI_SetParseEnd(INIParser:handle, const func[]); +static cell AMX_NATIVE_CALL INI_SetParseEnd(AMX *amx, cell *params) +{ + ParseInfo *p = g_TextParsersHandles.lookup(params[1]); + + if (p == NULL) + { + LogError(amx, AMX_ERR_NATIVE, "Invalid INI parse handle (%d)", params[1]); + return 0; + } + + int length = 0; + const char *funcName = NULL; + + if ((funcName = get_amxstring(amx, params[2], 0, length))) + { + p->parse_end = registerSPForwardByName(amx, funcName, FP_CELL, FP_CELL, FP_CELL, FP_DONE); + } + + if (p->parse_end == -1) + { + LogError(amx, AMX_ERR_NATIVE, "Function is not present (function \"%s\") (plugin \"%s\")", funcName, g_plugins.findPluginFast(amx)->getName()); + return 0; + } + + return 1; +} + +// native INI_SetReaders(INIParser:smc, const kvFunc[], const nsFunc[] = "" ); +static cell AMX_NATIVE_CALL INI_SetReaders(AMX *amx, cell *params) +{ + ParseInfo *p = g_TextParsersHandles.lookup(params[1]); + + if (p == NULL) + { + LogError(amx, AMX_ERR_NATIVE, "Invalid INI parse handle (%d)", params[1]); + return 0; + } + + int kvLength = 0, nsLength = 0; + const char *funcName = NULL; + + if ((funcName = get_amxstring(amx, params[2], 0, kvLength)) && kvLength) + { + p->key_value = registerSPForwardByName(amx, funcName, FP_CELL, FP_STRING, FP_STRING, FP_CELL, FP_CELL, FP_CELL, FP_CELL, FP_DONE); + } + + if (kvLength && (funcName = get_amxstring(amx, params[3], 1, nsLength)) && nsLength) + { + p->new_section = registerSPForwardByName(amx, funcName, FP_CELL, FP_STRING, FP_CELL, FP_CELL, FP_CELL, FP_CELL, FP_DONE); + } + + if (p->key_value == -1 || (nsLength && p->new_section == -1)) + { + LogError(amx, AMX_ERR_NATIVE, "Function is not present (function \"%s\") (plugin \"%s\")", funcName, g_plugins.findPluginFast(amx)->getName()); + return 0; + } + + return 1; +} + +// native INI_SetRawLine(INIParser:handle, const func[]); +static cell AMX_NATIVE_CALL INI_SetRawLine(AMX *amx, cell *params) +{ + ParseInfo *p = g_TextParsersHandles.lookup(params[1]); + + if (p == NULL) + { + LogError(amx, AMX_ERR_NATIVE, "Invalid INI parse handle (%d)", params[1]); + return 0; + } + + int length = 0; + const char *funcName = NULL; + + if ((funcName = get_amxstring(amx, params[2], 0, length)) && length) + { + p->raw_line = registerSPForwardByName(amx, funcName, FP_CELL, FP_STRING, FP_CELL, FP_CELL, FP_DONE); + } + + if (p->raw_line == -1) + { + LogError(amx, AMX_ERR_NATIVE, "Function is not present (function \"%s\") (plugin \"%s\")", funcName, g_plugins.findPluginFast(amx)->getName()); + return 0; + } + + return 1; +} + +// native INI_DestroyParser(&INIParser:handle); +static cell AMX_NATIVE_CALL INI_DestroyParser(AMX *amx, cell *params) +{ + return destroyParser(get_amxaddr(amx, params[1])); +} + + +AMX_NATIVE_INFO g_TextParserNatives[] = +{ + { "SMC_CreateParser" , SMC_CreateParser }, + { "SMC_ParseFile" , SMC_ParseFile }, + { "SMC_GetErrorString", SMC_GetErrorString }, + { "SMC_SetParseStart" , SMC_SetParseStart }, + { "SMC_SetParseEnd" , SMC_SetParseEnd }, + { "SMC_SetReaders" , SMC_SetReaders }, + { "SMC_SetRawLine" , SMC_SetRawLine }, + { "SMC_DestroyParser" , SMC_DestroyParser }, + + { "INI_CreateParser" , INI_CreateParser }, + { "INI_ParseFile" , INI_ParseFile }, + { "INI_SetParseStart" , INI_SetParseStart }, + { "INI_SetParseEnd" , INI_SetParseEnd }, + { "INI_SetReaders" , INI_SetReaders }, + { "INI_SetRawLine" , INI_SetRawLine }, + { "INI_DestroyParser" , INI_DestroyParser }, + + { NULL, NULL }, +}; diff --git a/amxmodx/textparse.h b/amxmodx/textparse.h new file mode 100644 index 00000000..0d844f30 --- /dev/null +++ b/amxmodx/textparse.h @@ -0,0 +1,207 @@ +/** + * vim: set ts=4 sw=4 tw=99 noet: + * + * AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). + * Copyright (C) The AMX Mod X Development Team. + * + * This software is licensed under the GNU General Public License, version 3 or higher. + * Additional exceptions apply. For full license details, see LICENSE.txt or visit: + * https://alliedmods.net/amxmodx-license + */ + +#ifndef _INCLUDE_TEXTPARSE_H_ +#define _INCLUDE_TEXTPARSE_H_ + +#include "amxmodx.h" +#include "CTextParsers.h" + +class ParseInfo : + public ITextListener_SMC, + public ITextListener_INI +{ +public: + ParseInfo() + { + parse_start = -1; + parse_end = -1; + new_section = -1; + key_value = -1; + end_section = -1; + raw_line = -1; + handle = -1; + } + +public: + + /** + * SMC CONFIG. + */ + + void ReadSMC_ParseStart() + { + if (parse_start != -1) + executeForwards(parse_start, handle); + } + + void ReadSMC_ParseEnd(bool halted, bool failed) + { + if (parse_end != -1) + executeForwards(parse_end, handle, halted ? 1 : 0, failed ? 1 : 0); + } + + SMCResult ReadSMC_NewSection(const SMCStates *states, const char *name) + { + if (new_section != -1) + return (SMCResult)executeForwards(new_section, handle, name); + + return SMCResult_Continue; + } + + SMCResult ReadSMC_KeyValue(const SMCStates *states, const char *key, const char *value) + { + if (key_value != -1) + return (SMCResult)executeForwards(key_value, handle, key, value); + + return SMCResult_Continue; + } + + SMCResult ReadSMC_LeavingSection(const SMCStates *states) + { + if (end_section != -1) + return (SMCResult)executeForwards(end_section, handle); + + return SMCResult_Continue; + } + + SMCResult ReadSMC_RawLine(const SMCStates *states, const char *line) + { + if (raw_line != -1) + return (SMCResult)executeForwards(raw_line, handle, line, states->line); + + return SMCResult_Continue; + } + + + /** + * INI CONFIG. + */ + + void ReadINI_ParseStart() + { + if (parse_start != -1) + executeForwards(parse_start, handle); + } + + void ReadINI_ParseEnd(bool halted) + { + if (parse_end != -1) + executeForwards(parse_end, handle, halted ? 1 : 0); + } + + bool ReadINI_NewSection(const char *section, bool invalid_tokens, bool close_bracket, bool extra_tokens, unsigned int *curtok) + { + if (new_section != -1) + return executeForwards(new_section, handle, section, invalid_tokens, close_bracket, extra_tokens, *curtok) > 0 ? true : false; + + return true; + } + + bool ReadINI_KeyValue(const char *key, const char *value, bool invalid_tokens, bool equal_token, bool quotes, unsigned int *curtok) + { + if (key_value != -1) + return executeForwards(key_value, handle, key, value, invalid_tokens, equal_token, quotes, *curtok) > 0 ? true : false; + + return true; + } + + bool ReadINI_RawLine(const char *line, unsigned int *curtok) + { + if (raw_line != -1) + return executeForwards(raw_line, handle, line, *curtok) > 0 ? true : false; + + return true; + } +public: + int parse_start; + int parse_end; + int new_section; + int key_value; + int end_section; + int raw_line; + int handle; +}; + +template +class TextParserHandles +{ +private: + ke::Vector m_textparsers; + +public: + TextParserHandles() { } + ~TextParserHandles() + { + this->clear(); + } + + void clear() + { + for (size_t i = 0; i < m_textparsers.length(); i++) + { + if (m_textparsers[i] != NULL) + { + delete m_textparsers[i]; + } + } + + m_textparsers.clear(); + } + T *lookup(int handle) + { + handle--; + + if (handle < 0 || handle >= static_cast(m_textparsers.length())) + { + return NULL; + } + + return m_textparsers[handle]; + } + int create() + { + for (size_t i = 0; i < m_textparsers.length(); i++) + { + if (m_textparsers[i] == NULL) + { + // reuse handle + m_textparsers[i] = new T; + + return static_cast(i)+1; + } + } + m_textparsers.append(new T); + return m_textparsers.length(); + } + bool destroy(int handle) + { + handle--; + + if (handle < 0 || handle >= static_cast(m_textparsers.length())) + { + return false; + } + + if (m_textparsers[handle] == NULL) + { + return false; + } + delete m_textparsers[handle]; + m_textparsers[handle] = NULL; + + return true; + } +}; + +extern TextParserHandles g_TextParsersHandles; + +#endif // _INCLUDE_TEXTPARSE_H_ \ No newline at end of file diff --git a/amxmodx/trie_natives.cpp b/amxmodx/trie_natives.cpp index 90b4752a..286a1725 100644 --- a/amxmodx/trie_natives.cpp +++ b/amxmodx/trie_natives.cpp @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include #include #include diff --git a/amxmodx/trie_natives.h b/amxmodx/trie_natives.h index abefe7a1..5f85971d 100644 --- a/amxmodx/trie_natives.h +++ b/amxmodx/trie_natives.h @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #ifndef _TRIE_NATIVES_H_ #define _TRIE_NATIVES_H_ diff --git a/amxmodx/util.cpp b/amxmodx/util.cpp index eb2e0bba..5bd5f696 100755 --- a/amxmodx/util.cpp +++ b/amxmodx/util.cpp @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #include #include "amxmodx.h" @@ -731,4 +709,4 @@ size_t UTIL_Format(char *buffer, size_t maxlength, const char *fmt, ...) { return len; } -} \ No newline at end of file +} diff --git a/amxmodx/vault.cpp b/amxmodx/vault.cpp index 8fb87cc8..ed3edec6 100755 --- a/amxmodx/vault.cpp +++ b/amxmodx/vault.cpp @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #include "amxmodx.h" #include "CVault.h" diff --git a/amxmodx/vector.cpp b/amxmodx/vector.cpp index 44ab0f2d..5966f080 100644 --- a/amxmodx/vector.cpp +++ b/amxmodx/vector.cpp @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #include "amxmodx.h" diff --git a/amxmodx/zlib/zconf.h b/amxmodx/zlib/zconf.h index 1292dda1..1731ebff 100755 --- a/amxmodx/zlib/zconf.h +++ b/amxmodx/zlib/zconf.h @@ -3,8 +3,6 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ -/* @(#) $Id: zconf.h 3734 2008-08-16 09:48:39Z damagedsoul $ */ - #ifndef ZCONF_H #define ZCONF_H diff --git a/compiler/amxxpc/Binary.cpp b/compiler/amxxpc/Binary.cpp index 9d029dca..4b3a7a66 100755 --- a/compiler/amxxpc/Binary.cpp +++ b/compiler/amxxpc/Binary.cpp @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include "Binary.h" BinaryWriter::BinaryWriter(FILE *fp) diff --git a/compiler/amxxpc/Binary.h b/compiler/amxxpc/Binary.h index 4747902e..60df030e 100755 --- a/compiler/amxxpc/Binary.h +++ b/compiler/amxxpc/Binary.h @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #ifndef _INCLUDE_BINARY_H #define _INCLUDE_BINARY_H diff --git a/compiler/amxxpc/amx.cpp b/compiler/amxxpc/amx.cpp index a7f5da7a..4893b3d2 100755 --- a/compiler/amxxpc/amx.cpp +++ b/compiler/amxxpc/amx.cpp @@ -17,8 +17,6 @@ * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id: amx.cpp 1728 2005-07-25 00:01:54Z dvander $ */ #if BUILD_PLATFORM == WINDOWS && BUILD_TYPE == RELEASE && BUILD_COMPILER == MSVC && PAWN_CELL_SIZE == 64 diff --git a/compiler/amxxpc/amx.h b/compiler/amxxpc/amx.h index e1e65d48..4c0721a5 100755 --- a/compiler/amxxpc/amx.h +++ b/compiler/amxxpc/amx.h @@ -17,8 +17,6 @@ * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id: amx.h 3736 2008-08-16 20:13:12Z damagedsoul $ */ #if defined FREEBSD && !defined __FreeBSD__ diff --git a/compiler/amxxpc/amxdbg.h b/compiler/amxxpc/amxdbg.h index 7ffca1b5..f3b8f685 100755 --- a/compiler/amxxpc/amxdbg.h +++ b/compiler/amxxpc/amxdbg.h @@ -20,8 +20,6 @@ * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id: amxdbg.h 3736 2008-08-16 20:13:12Z damagedsoul $ */ #ifndef AMXDBG_H_INCLUDED diff --git a/compiler/amxxpc/amxxpc.cpp b/compiler/amxxpc/amxxpc.cpp index 52a87fb2..0295abae 100755 --- a/compiler/amxxpc/amxxpc.cpp +++ b/compiler/amxxpc/amxxpc.cpp @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include #if defined(__linux__) | defined (__APPLE__) #include diff --git a/compiler/amxxpc/amxxpc.h b/compiler/amxxpc/amxxpc.h index b601a8b3..c35c324d 100755 --- a/compiler/amxxpc/amxxpc.h +++ b/compiler/amxxpc/amxxpc.h @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #ifndef _AMXXSC_INCLUDE_H #define _AMXXSC_INCLUDE_H diff --git a/compiler/amxxpc/zconf.h b/compiler/amxxpc/zconf.h index 1292dda1..1731ebff 100755 --- a/compiler/amxxpc/zconf.h +++ b/compiler/amxxpc/zconf.h @@ -3,8 +3,6 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ -/* @(#) $Id: zconf.h 3734 2008-08-16 09:48:39Z damagedsoul $ */ - #ifndef ZCONF_H #define ZCONF_H diff --git a/compiler/compile/compile.dpr b/compiler/compile/compile.dpr index 3cbf6e05..61d9a431 100755 --- a/compiler/compile/compile.dpr +++ b/compiler/compile/compile.dpr @@ -1,33 +1,11 @@ -(* AMX Mod X -* compile.exe -* -* by the AMX Mod X Development Team -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*) +// vim: set sts=2 ts=8 sw=2 tw=99 et: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license program compile; diff --git a/compiler/compile/uFunc.pas b/compiler/compile/uFunc.pas index 292d3adf..b3bbb9d9 100755 --- a/compiler/compile/uFunc.pas +++ b/compiler/compile/uFunc.pas @@ -1,33 +1,11 @@ -(* AMX Mod X -* compile.exe -* -* by the AMX Mod X Development Team -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*) +// vim: set sts=2 ts=8 sw=2 tw=99 et: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license unit uFunc; diff --git a/compiler/libpc300/amx.h b/compiler/libpc300/amx.h index d044c99e..7cdebe94 100755 --- a/compiler/libpc300/amx.h +++ b/compiler/libpc300/amx.h @@ -17,8 +17,6 @@ * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id: amx.h 3736 2008-08-16 20:13:12Z damagedsoul $ */ #ifdef _MSC_VER diff --git a/compiler/libpc300/amxdbg.h b/compiler/libpc300/amxdbg.h index 7ffca1b5..f3b8f685 100755 --- a/compiler/libpc300/amxdbg.h +++ b/compiler/libpc300/amxdbg.h @@ -20,8 +20,6 @@ * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id: amxdbg.h 3736 2008-08-16 20:13:12Z damagedsoul $ */ #ifndef AMXDBG_H_INCLUDED diff --git a/compiler/libpc300/dllmain.c b/compiler/libpc300/dllmain.c index b093e88c..40b6756a 100755 --- a/compiler/libpc300/dllmain.c +++ b/compiler/libpc300/dllmain.c @@ -17,8 +17,6 @@ * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id: dllmain.c 1724 2005-07-24 20:00:55Z dvander $ */ #if defined _UNICODE || defined __UNICODE__ || defined UNICODE diff --git a/compiler/libpc300/libpawnc.c b/compiler/libpc300/libpawnc.c index fe499e2e..9133b83f 100755 --- a/compiler/libpc300/libpawnc.c +++ b/compiler/libpc300/libpawnc.c @@ -19,9 +19,8 @@ * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id: libpawnc.c 2969 2006-08-25 00:28:36Z dvander $ */ + #include #include #include diff --git a/compiler/libpc300/memfile.c b/compiler/libpc300/memfile.c index a0955e9a..39044ec9 100644 --- a/compiler/libpc300/memfile.c +++ b/compiler/libpc300/memfile.c @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include "memfile.h" #include #include "osdefs.h" diff --git a/compiler/libpc300/memfile.h b/compiler/libpc300/memfile.h index 7f39a8a5..c03a10ab 100644 --- a/compiler/libpc300/memfile.h +++ b/compiler/libpc300/memfile.h @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #ifndef _INCLUDE_MEMFILE_H #define _INCLUDE_MEMFILE_H diff --git a/compiler/libpc300/pawncc.c b/compiler/libpc300/pawncc.c index 1d2e7d56..6e541450 100755 --- a/compiler/libpc300/pawncc.c +++ b/compiler/libpc300/pawncc.c @@ -19,9 +19,8 @@ * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id: pawncc.c 1724 2005-07-24 20:00:55Z dvander $ */ + #include "sc.h" int main(int argc, char *argv[]) diff --git a/compiler/libpc300/sc.h b/compiler/libpc300/sc.h index 79996d26..ff0da2e9 100755 --- a/compiler/libpc300/sc.h +++ b/compiler/libpc300/sc.h @@ -24,9 +24,8 @@ * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id: sc.h 3460 2007-04-24 13:36:36Z sawce $ */ + #ifndef SC_H_INCLUDED #define SC_H_INCLUDED #include diff --git a/compiler/libpc300/sc1.c b/compiler/libpc300/sc1.c index a67daf20..d432a4a2 100755 --- a/compiler/libpc300/sc1.c +++ b/compiler/libpc300/sc1.c @@ -19,9 +19,8 @@ * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id: sc1.c 3460 2007-04-24 13:36:36Z sawce $ */ + #include #include #include diff --git a/compiler/libpc300/sc2.c b/compiler/libpc300/sc2.c index f6961e39..42c31c08 100755 --- a/compiler/libpc300/sc2.c +++ b/compiler/libpc300/sc2.c @@ -17,9 +17,8 @@ * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id: sc2.c 3318 2007-02-16 18:49:21Z sawce $ */ + #include #include #include diff --git a/compiler/libpc300/sc3.c b/compiler/libpc300/sc3.c index 6e5d075b..c44194cc 100755 --- a/compiler/libpc300/sc3.c +++ b/compiler/libpc300/sc3.c @@ -17,9 +17,8 @@ * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id: sc3.c 3522 2007-05-22 01:29:18Z sawce $ */ + #include #include #include /* for _MAX_PATH */ diff --git a/compiler/libpc300/sc4.c b/compiler/libpc300/sc4.c index d5ef6902..b0249589 100755 --- a/compiler/libpc300/sc4.c +++ b/compiler/libpc300/sc4.c @@ -17,9 +17,8 @@ * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id: sc4.c 1724 2005-07-24 20:00:55Z dvander $ */ + #include #include #include diff --git a/compiler/libpc300/sc5.c b/compiler/libpc300/sc5.c index 7cad31c5..d5ae68b4 100755 --- a/compiler/libpc300/sc5.c +++ b/compiler/libpc300/sc5.c @@ -18,9 +18,8 @@ * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id: sc5.c 1724 2005-07-24 20:00:55Z dvander $ */ + #include #if defined __WIN32__ || defined _WIN32 || defined __MSDOS__ #include diff --git a/compiler/libpc300/sc6.c b/compiler/libpc300/sc6.c index 0d94d989..af5762ca 100755 --- a/compiler/libpc300/sc6.c +++ b/compiler/libpc300/sc6.c @@ -17,9 +17,8 @@ * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id: sc6.c 2018 2005-09-06 21:34:33Z dvander $ */ + #include #include #include /* for macro max() */ diff --git a/compiler/libpc300/sc7.c b/compiler/libpc300/sc7.c index d4f0aa19..0037328c 100755 --- a/compiler/libpc300/sc7.c +++ b/compiler/libpc300/sc7.c @@ -34,9 +34,8 @@ * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id: sc7.c 1724 2005-07-24 20:00:55Z dvander $ */ + #include #include #include /* for atoi() */ diff --git a/compiler/libpc300/sci18n.c b/compiler/libpc300/sci18n.c index 34a99a3c..2a7518b9 100755 --- a/compiler/libpc300/sci18n.c +++ b/compiler/libpc300/sci18n.c @@ -29,9 +29,8 @@ * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id: sci18n.c 1724 2005-07-24 20:00:55Z dvander $ */ + #include #include #include diff --git a/compiler/libpc300/sclist.c b/compiler/libpc300/sclist.c index 0875fd26..b547f4aa 100755 --- a/compiler/libpc300/sclist.c +++ b/compiler/libpc300/sclist.c @@ -21,9 +21,8 @@ * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id: sclist.c 3736 2008-08-16 20:13:12Z damagedsoul $ */ + #include #include #include diff --git a/compiler/libpc300/scmemfil.c b/compiler/libpc300/scmemfil.c index 2f6cd687..23f44278 100755 --- a/compiler/libpc300/scmemfil.c +++ b/compiler/libpc300/scmemfil.c @@ -21,8 +21,6 @@ * misrepresented as being the original software. * * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id: scmemfil.c 2866 2006-07-16 02:25:32Z faluco $ */ #include diff --git a/compiler/libpc300/scstate.c b/compiler/libpc300/scstate.c index 05806a89..e9f31d77 100755 --- a/compiler/libpc300/scstate.c +++ b/compiler/libpc300/scstate.c @@ -42,9 +42,8 @@ * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id: scstate.c 1724 2005-07-24 20:00:55Z dvander $ */ + #include #include #include diff --git a/compiler/libpc300/scvars.c b/compiler/libpc300/scvars.c index f265f184..51430d03 100755 --- a/compiler/libpc300/scvars.c +++ b/compiler/libpc300/scvars.c @@ -19,9 +19,8 @@ * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. - * - * Version: $Id: scvars.c 1724 2005-07-24 20:00:55Z dvander $ */ + #include #include /* for _MAX_PATH */ #include "sc.h" diff --git a/dlls/cstrike/cstrike/CstrikeDatas.h b/dlls/cstrike/cstrike/CstrikeDatas.h index c1d138f1..59d955e1 100644 --- a/dlls/cstrike/cstrike/CstrikeDatas.h +++ b/dlls/cstrike/cstrike/CstrikeDatas.h @@ -1,35 +1,16 @@ -/* AMX Mod X - * Counter-Strike Module - * - * by the AMX Mod X Development Team - * - * This file is part of AMX Mod X. - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Counter-Strike Module +// + #ifndef CSTRIKE_DATA_H #define CSTRIKE_DATA_H @@ -368,4 +349,4 @@ typedef enum } Menu; -#endif // CSTRIKE_DATA_H \ No newline at end of file +#endif // CSTRIKE_DATA_H diff --git a/dlls/cstrike/cstrike/CstrikeHacks.cpp b/dlls/cstrike/cstrike/CstrikeHacks.cpp index d20a9d59..4094d4e4 100644 --- a/dlls/cstrike/cstrike/CstrikeHacks.cpp +++ b/dlls/cstrike/cstrike/CstrikeHacks.cpp @@ -1,35 +1,16 @@ -/* AMX Mod X - * Counter-Strike Module - * - * by the AMX Mod X Development Team - * - * This file is part of AMX Mod X. - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Counter-Strike Module +// + #include "CstrikeDatas.h" #include "CstrikeUtils.h" #include "CDetour/detours.h" @@ -373,4 +354,4 @@ void ToggleDetour_BuyCommands(bool enable) if (AddAccountDetour) (enable) ? AddAccountDetour->EnableDetour() : AddAccountDetour->DisableDetour(); -} \ No newline at end of file +} diff --git a/dlls/cstrike/cstrike/CstrikeNatives.cpp b/dlls/cstrike/cstrike/CstrikeNatives.cpp index 756998b6..e494bfb0 100644 --- a/dlls/cstrike/cstrike/CstrikeNatives.cpp +++ b/dlls/cstrike/cstrike/CstrikeNatives.cpp @@ -1,35 +1,16 @@ -/* AMX Mod X - * Counter-Strike Module - * - * by the AMX Mod X Development Team - * - * This file is part of AMX Mod X. - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Counter-Strike Module +// + #include "CstrikeDatas.h" #include "CstrikePlayer.h" #include "CstrikeUtils.h" @@ -1890,4 +1871,4 @@ void PlayerPreThink(edict_t *pPlayer) } RETURN_META(MRES_IGNORED); -} \ No newline at end of file +} diff --git a/dlls/cstrike/cstrike/CstrikePlayer.cpp b/dlls/cstrike/cstrike/CstrikePlayer.cpp index cd72d55f..a3953e13 100755 --- a/dlls/cstrike/cstrike/CstrikePlayer.cpp +++ b/dlls/cstrike/cstrike/CstrikePlayer.cpp @@ -1,6 +1,15 @@ -// CstrikePlayer.cpp: implementation of the CCstrikePlayer class. +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Counter-Strike Module // -////////////////////////////////////////////////////////////////////// #include "CstrikePlayer.h" #include // strcpy() diff --git a/dlls/cstrike/cstrike/CstrikePlayer.h b/dlls/cstrike/cstrike/CstrikePlayer.h index 177b17d9..0674192d 100755 --- a/dlls/cstrike/cstrike/CstrikePlayer.h +++ b/dlls/cstrike/cstrike/CstrikePlayer.h @@ -1,6 +1,15 @@ -// CstrikePlayer.h: interface for the CCstrikePlayer class. +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Counter-Strike Module // -////////////////////////////////////////////////////////////////////// #if !defined(INCLUDED_CCSTRIKEPLAYER) #define INCLUDED_CCSTRIKEPLAYER diff --git a/dlls/cstrike/cstrike/CstrikeUtils.cpp b/dlls/cstrike/cstrike/CstrikeUtils.cpp index 76783b45..42b44a75 100644 --- a/dlls/cstrike/cstrike/CstrikeUtils.cpp +++ b/dlls/cstrike/cstrike/CstrikeUtils.cpp @@ -1,35 +1,16 @@ -/* AMX Mod X -* Counter-Strike Module -* -* by the AMX Mod X Development Team -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Counter-Strike Module +// + #include "amxxmodule.h" #include "MemoryUtils.h" @@ -150,4 +131,4 @@ char *UTIL_StringToLower(char *str) } return str; -} \ No newline at end of file +} diff --git a/dlls/cstrike/cstrike/CstrikeUtils.h b/dlls/cstrike/cstrike/CstrikeUtils.h index 4a58d5df..9e8f75cd 100644 --- a/dlls/cstrike/cstrike/CstrikeUtils.h +++ b/dlls/cstrike/cstrike/CstrikeUtils.h @@ -1,35 +1,16 @@ -/* AMX Mod X -* Counter-Strike Module -* -* by the AMX Mod X Development Team -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Counter-Strike Module +// + #ifndef CSTRIKE_UTILS_H #define CSTRIKE_UTILS_H @@ -119,4 +100,4 @@ inline int PrivateToIndex(const void *pdata) return ENTINDEX(pEntity); }; -#endif // CSTRIKE_UTILS_H \ No newline at end of file +#endif // CSTRIKE_UTILS_H diff --git a/dlls/cstrike/cstrike/amxx_api.cpp b/dlls/cstrike/cstrike/amxx_api.cpp index bd1c9c3a..17dfd227 100644 --- a/dlls/cstrike/cstrike/amxx_api.cpp +++ b/dlls/cstrike/cstrike/amxx_api.cpp @@ -1,35 +1,16 @@ -/* AMX Mod X - * Counter-Strike Module - * - * by the AMX Mod X Development Team - * - * This file is part of AMX Mod X. - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Counter-Strike Module +// + #include "amxxmodule.h" #include "CstrikeUtils.h" @@ -81,4 +62,4 @@ void OnPluginsLoaded() void OnAmxxDetach() { ShutdownHacks(); -} \ No newline at end of file +} diff --git a/dlls/cstrike/cstrike/sdk/amxxmodule.cpp b/dlls/cstrike/cstrike/sdk/amxxmodule.cpp index efb933b3..7de02e6e 100755 --- a/dlls/cstrike/cstrike/sdk/amxxmodule.cpp +++ b/dlls/cstrike/cstrike/sdk/amxxmodule.cpp @@ -1,36 +1,16 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* Parts Copyright (C) 2001-2003 Will Day -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -* -* Description: AMX Mod X Module Interface Functions -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Parts Copyright (C) 2001-2003 Will Day +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module SDK +// #include #include diff --git a/dlls/cstrike/cstrike/sdk/amxxmodule.h b/dlls/cstrike/cstrike/sdk/amxxmodule.h index 3ca8c7b6..6a760b25 100755 --- a/dlls/cstrike/cstrike/sdk/amxxmodule.h +++ b/dlls/cstrike/cstrike/sdk/amxxmodule.h @@ -1,7 +1,16 @@ -/* - * AMX Mod X Module Interface Functions - * This file may be freely used -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license +// + +// +// Module SDK +// // prevent double include #ifndef __AMXXMODULE_H__ diff --git a/dlls/cstrike/cstrike/sdk/moduleconfig.h b/dlls/cstrike/cstrike/sdk/moduleconfig.h index d3bf9a63..86139e62 100755 --- a/dlls/cstrike/cstrike/sdk/moduleconfig.h +++ b/dlls/cstrike/cstrike/sdk/moduleconfig.h @@ -1,4 +1,15 @@ -// Configuration +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module Config +// #ifndef __MODULECONFIG_H__ #define __MODULECONFIG_H__ diff --git a/dlls/cstrike/csx/CMisc.cpp b/dlls/cstrike/csx/CMisc.cpp index c8a4ee3b..218b0373 100755 --- a/dlls/cstrike/csx/CMisc.cpp +++ b/dlls/cstrike/csx/CMisc.cpp @@ -1,4 +1,15 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license +// +// CSX Module +// #include "CMisc.h" #include "rank.h" diff --git a/dlls/cstrike/csx/CMisc.h b/dlls/cstrike/csx/CMisc.h index e2b565a8..4c6492be 100755 --- a/dlls/cstrike/csx/CMisc.h +++ b/dlls/cstrike/csx/CMisc.h @@ -1,4 +1,15 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license +// +// CSX Module +// #ifndef CMISC_H #define CMISC_H diff --git a/dlls/cstrike/csx/CRank.cpp b/dlls/cstrike/csx/CRank.cpp index 37d795ce..b05bccfe 100755 --- a/dlls/cstrike/csx/CRank.cpp +++ b/dlls/cstrike/csx/CRank.cpp @@ -1,4 +1,15 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license +// +// CSX Module +// #include "amxxmodule.h" #include "CRank.h" diff --git a/dlls/cstrike/csx/CRank.h b/dlls/cstrike/csx/CRank.h index 2b538d8e..ec5e8248 100755 --- a/dlls/cstrike/csx/CRank.h +++ b/dlls/cstrike/csx/CRank.h @@ -1,4 +1,15 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license +// +// CSX Module +// #ifndef CRANK_H #define CRANK_H diff --git a/dlls/cstrike/csx/WinCSX/CRank.cpp b/dlls/cstrike/csx/WinCSX/CRank.cpp index 14d48ddf..3c8ea3bb 100755 --- a/dlls/cstrike/csx/WinCSX/CRank.cpp +++ b/dlls/cstrike/csx/WinCSX/CRank.cpp @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include "stdafx.h" #include "CRank.h" @@ -340,4 +349,4 @@ void RankSystem::saveRank( const char* filename ) fwrite( &i , 1, sizeof(short int), bfp); // null terminator fclose(bfp); -} \ No newline at end of file +} diff --git a/dlls/cstrike/csx/WinCSX/CRank.h b/dlls/cstrike/csx/WinCSX/CRank.h index 8fd17b7d..42d4b94a 100755 --- a/dlls/cstrike/csx/WinCSX/CRank.h +++ b/dlls/cstrike/csx/WinCSX/CRank.h @@ -1,4 +1,11 @@ - +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef CRANK_H #define CRANK_H @@ -125,4 +132,4 @@ public: }; -#endif \ No newline at end of file +#endif diff --git a/dlls/cstrike/csx/WinCSX/WinCSX.cpp b/dlls/cstrike/csx/WinCSX/WinCSX.cpp index baa05372..84650674 100755 --- a/dlls/cstrike/csx/WinCSX/WinCSX.cpp +++ b/dlls/cstrike/csx/WinCSX/WinCSX.cpp @@ -1,5 +1,11 @@ -// WinCSX.cpp : Defines the entry point for the application. +// vim: set ts=4 sw=4 tw=99 noet: // +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #include "stdafx.h" #include "WinCSX.h" diff --git a/dlls/cstrike/csx/WinCSX/WinCSX.h b/dlls/cstrike/csx/WinCSX/WinCSX.h index 2aa2f7ab..5be31ac3 100755 --- a/dlls/cstrike/csx/WinCSX/WinCSX.h +++ b/dlls/cstrike/csx/WinCSX/WinCSX.h @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #pragma once #include "resource.h" diff --git a/dlls/cstrike/csx/WinCSX/amxxmodule.h b/dlls/cstrike/csx/WinCSX/amxxmodule.h index 71077bdd..6a760b25 100755 --- a/dlls/cstrike/csx/WinCSX/amxxmodule.h +++ b/dlls/cstrike/csx/WinCSX/amxxmodule.h @@ -1,7 +1,16 @@ -/* - * AMX Mod X Module Interface Functions - * This file may be freely used -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license +// + +// +// Module SDK +// // prevent double include #ifndef __AMXXMODULE_H__ @@ -10,6 +19,7 @@ // config #include "moduleconfig.h" +#include // size_t // metamod include files #ifdef USE_METAMOD #include @@ -19,11 +29,16 @@ // DLL Export #undef DLLEXPORT -#ifndef __linux__ +#if defined(_WIN32) #define DLLEXPORT __declspec(dllexport) #else -#define DLLEXPORT +#define DLLEXPORT __attribute__((visibility("default"))) +#endif + +#if defined(__linux__) && !defined(LINUX) #define LINUX +#elif defined(__APPLE__) && !defined(OSX) +#define OSX #endif #undef C_DLLEXPORT @@ -34,7 +49,8 @@ // module interface version was 1 // 2 - added logtag to struct (amxx1.1-rc1) // 3 - added new tagAMX structure (amxx1.5) -#define AMXX_INTERFACE_VERSION 3 +// 4 - added new 'library' setting for direct loading +#define AMXX_INTERFACE_VERSION 4 // amxx module info struct amxx_module_info_s @@ -44,6 +60,8 @@ struct amxx_module_info_s const char *version; int reload; // reload on mapchange when nonzero const char *logtag; // added in version 2 + const char *library; // added in version 4 + const char *libclass; // added in version 4 }; // return values from functions called by amxx @@ -52,6 +70,9 @@ struct amxx_module_info_s #define AMXX_PARAM 2 /* Invalid parameter */ #define AMXX_FUNC_NOT_PRESENT 3 /* Function not present */ +#define AMXX_GAME_OK 0 /* This module can load on the current game mod. */ +#define AMXX_GAME_BAD 1 /* This module can not load on the current game mod. */ + // *** Small stuff *** // The next section is copied from the amx.h file // Copyright (c) ITB CompuPhase, 1997-2005 @@ -59,7 +80,7 @@ struct amxx_module_info_s #if defined HAVE_STDINT_H #include #else - #if defined __LCC__ || defined __DMC__ || defined LINUX + #if defined __LCC__ || defined __DMC__ || defined LINUX || defined __APPLE__ #if defined HAVE_INTTYPES_H #include #else @@ -301,7 +322,7 @@ typedef int (AMXAPI *AMX_DEBUG)(struct tagAMX *amx); #endif #if !defined AMX_NO_ALIGN - #if defined LINUX || defined __FreeBSD__ + #if defined LINUX || defined __FreeBSD__ || defined __APPLE__ #pragma pack(1) /* structures must be packed (byte-aligned) */ #elif defined MACOS && defined __MWERKS__ #pragma options align=mac68k @@ -388,7 +409,7 @@ enum { }; #if !defined AMX_NO_ALIGN - #if defined __linux__ + #if defined(__linux__) || defined(__APPLE__) #pragma pack() /* reset default packing */ #else #pragma pack(pop) /* reset previous packing */ @@ -399,7 +420,7 @@ enum { // ***** declare functions ***** #ifdef USE_METAMOD -void UTIL_LogPrintf( char *fmt, ... ); +void UTIL_LogPrintf( const char *fmt, ... ); void UTIL_HudMessage(CBaseEntity *pEntity, const hudtextparms_t &textparms, const char *pMessage); short FixedSigned16( float value, float scale ); unsigned short FixedUnsigned16( float value, float scale ); @@ -826,11 +847,11 @@ int FN_AllowLagCompensation_Post(void); #ifdef FN_PrecacheModel -int FN_PrecacheModel(char *s); +int FN_PrecacheModel(const char *s); #endif // FN_PrecacheModel #ifdef FN_PrecacheSound -int FN_PrecacheSound(char *s); +int FN_PrecacheSound(const char *s); #endif // FN_PrecacheSound #ifdef FN_SetModel @@ -850,7 +871,7 @@ void FN_SetSize(edict_t *e, const float *rgflMin, const float *rgflMax); #endif // FN_SetSize #ifdef FN_ChangeLevel -void FN_ChangeLevel(char *s1, char *s2); +void FN_ChangeLevel(const char *s1, const char *s2); #endif // FN_ChangeLevel #ifdef FN_GetSpawnParms @@ -998,7 +1019,7 @@ void FN_ParticleEffect(const float *org, const float *dir, float color, float co #endif // FN_ParticleEffect #ifdef FN_LightStyle -void FN_LightStyle(int style, char *val); +void FN_LightStyle(int style, const char *val); #endif // FN_LightStyle #ifdef FN_DecalIndex @@ -1074,7 +1095,7 @@ void FN_AlertMessage(ALERT_TYPE atype, char *szFmt, ...); #endif // FN_AlertMessage #ifdef FN_EngineFprintf -void FN_EngineFprintf(FILE *pfile, char *szFmt, ...); +void FN_EngineFprintf(void *pfile, char *szFmt, ...); #endif // FN_EngineFprintf #ifdef FN_PvAllocEntPrivateData @@ -1138,11 +1159,11 @@ void FN_GetBonePosition(const edict_t *pEdict, int iBone, float *rgflOrigin, flo #endif // FN_GetBonePosition #ifdef FN_FunctionFromName -unsigned long FN_FunctionFromName(const char *pName); +uint32 FN_FunctionFromName(const char *pName); #endif // FN_FunctionFromName #ifdef FN_NameForFunction -const char *FN_NameForFunction(unsigned long function); +const char *FN_NameForFunction(uint32); #endif // FN_NameForFunction #ifdef FN_ClientPrintf @@ -1186,7 +1207,7 @@ CRC32_t FN_CRC32_Final(CRC32_t pulCRC); #endif // FN_CRC32_Final #ifdef FN_RandomLong -long FN_RandomLong(long lLow, long lHigh); +int32 FN_RandomLong(int32 lLow, int32 lHigh); #endif // FN_RandomLong #ifdef FN_RandomFloat @@ -1206,7 +1227,7 @@ void FN_CrosshairAngle(const edict_t *pClient, float pitch, float yaw); #endif // FN_CrosshairAngle #ifdef FN_LoadFileForMe -byte *FN_LoadFileForMe(char *filename, int *pLength); +byte *FN_LoadFileForMe(const char *filename, int *pLength); #endif // FN_LoadFileForMe #ifdef FN_FreeFile @@ -1254,19 +1275,19 @@ char *FN_GetInfoKeyBuffer(edict_t *e); #endif // FN_GetInfoKeyBuffer #ifdef FN_InfoKeyValue -char *FN_InfoKeyValue(char *infobuffer, char *key); +char *FN_InfoKeyValue(char *infobuffer, const char *key); #endif // FN_InfoKeyValue #ifdef FN_SetKeyValue -void FN_SetKeyValue(char *infobuffer, char *key, char *value); +void FN_SetKeyValue(char *infobuffer, const char *key, const char *value); #endif // FN_SetKeyValue #ifdef FN_SetClientKeyValue -void FN_SetClientKeyValue(int clientIndex, char *infobuffer, char *key, char *value); +void FN_SetClientKeyValue(int clientIndex, char *infobuffer, const char *key, const char *value); #endif // FN_SetClientKeyValue #ifdef FN_IsMapValid -int FN_IsMapValid(char *filename); +int FN_IsMapValid(const char *filename); #endif // FN_IsMapValid #ifdef FN_StaticDecal @@ -1274,7 +1295,7 @@ void FN_StaticDecal(const float *origin, int decalIndex, int entityIndex, int mo #endif // FN_StaticDecal #ifdef FN_PrecacheGeneric -int FN_PrecacheGeneric(char *s); +int FN_PrecacheGeneric(const char *s); #endif // FN_PrecacheGeneric #ifdef FN_GetPlayerUserId @@ -1342,7 +1363,7 @@ void FN_DeltaUnsetField(struct delta_s *pFields, const char *fieldname); #endif // FN_DeltaUnsetField #ifdef FN_DeltaAddEncoder -void FN_DeltaAddEncoder(char *name, void (*conditionalencode)( struct delta_s *pFields, const unsigned char *from, const unsigned char *to ) ); +void FN_DeltaAddEncoder(const char *name, void (*conditionalencode)( struct delta_s *pFields, const unsigned char *from, const unsigned char *to ) ); #endif // FN_DeltaAddEncoder #ifdef FN_GetCurrentPlayer @@ -1374,7 +1395,7 @@ int FN_engCreateInstancedBaseline(int classname, struct entity_state_s *baseline #endif // FN_engCreateInstancedBaseline #ifdef FN_Cvar_DirectSet -void FN_Cvar_DirectSet(struct cvar_s *var, char *value); +void FN_Cvar_DirectSet(struct cvar_s *var, const char *value); #endif // FN_Cvar_DirectSet #ifdef FN_ForceUnmodified @@ -1407,11 +1428,11 @@ const char *FN_GetPlayerAuthId(edict_t *e); #ifdef FN_PrecacheModel_Post -int FN_PrecacheModel_Post(char *s); +int FN_PrecacheModel_Post(const char *s); #endif // FN_PrecacheModel_Post #ifdef FN_PrecacheSound_Post -int FN_PrecacheSound_Post(char *s); +int FN_PrecacheSound_Post(const char *s); #endif // FN_PrecacheSound_Post #ifdef FN_SetModel_Post @@ -1431,7 +1452,7 @@ void FN_SetSize_Post(edict_t *e, const float *rgflMin, const float *rgflMax); #endif // FN_SetSize_Post #ifdef FN_ChangeLevel_Post -void FN_ChangeLevel_Post(char *s1, char *s2); +void FN_ChangeLevel_Post(const char *s1, const char *s2); #endif // FN_ChangeLevel_Post #ifdef FN_GetSpawnParms_Post @@ -1579,7 +1600,7 @@ void FN_ParticleEffect_Post(const float *org, const float *dir, float color, flo #endif // FN_ParticleEffect_Post #ifdef FN_LightStyle_Post -void FN_LightStyle_Post(int style, char *val); +void FN_LightStyle_Post(int style, const char *val); #endif // FN_LightStyle_Post #ifdef FN_DecalIndex_Post @@ -1655,11 +1676,11 @@ void FN_AlertMessage_Post(ALERT_TYPE atype, char *szFmt, ...); #endif // FN_AlertMessage_Post #ifdef FN_EngineFprintf_Post -void FN_EngineFprintf_Post(FILE *pfile, char *szFmt, ...); +void FN_EngineFprintf_Post(void *pfile, char *szFmt, ...); #endif // FN_EngineFprintf_Post #ifdef FN_PvAllocEntPrivateData_Post -void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, long cb); +void *FN_PvAllocEntPrivateData_Post(edict_t *pEdict, int32 cb); #endif // FN_PvAllocEntPrivateData_Post #ifdef FN_PvEntPrivateData_Post @@ -1719,11 +1740,11 @@ void FN_GetBonePosition_Post(const edict_t *pEdict, int iBone, float *rgflOrigin #endif // FN_GetBonePosition_Post #ifdef FN_FunctionFromName_Post -unsigned long FN_FunctionFromName_Post(const char *pName); +uint32 FN_FunctionFromName_Post(const char *pName); #endif // FN_FunctionFromName_Post #ifdef FN_NameForFunction_Post -const char *FN_NameForFunction_Post(unsigned long function); +const char *FN_NameForFunction_Post(uint32); #endif // FN_NameForFunction_Post #ifdef FN_ClientPrintf_Post @@ -1767,7 +1788,7 @@ CRC32_t FN_CRC32_Final_Post(CRC32_t pulCRC); #endif // FN_CRC32_Final_Post #ifdef FN_RandomLong_Post -long FN_RandomLong_Post(long lLow, long lHigh); +int32 FN_RandomLong_Post(int32 lLow, int32 lHigh); #endif // FN_RandomLong_Post #ifdef FN_RandomFloat_Post @@ -1787,7 +1808,7 @@ void FN_CrosshairAngle_Post(const edict_t *pClient, float pitch, float yaw); #endif // FN_CrosshairAngle_Post #ifdef FN_LoadFileForMe_Post -byte *FN_LoadFileForMe_Post(char *filename, int *pLength); +byte *FN_LoadFileForMe_Post(const char *filename, int *pLength); #endif // FN_LoadFileForMe_Post #ifdef FN_FreeFile_Post @@ -1835,19 +1856,19 @@ char *FN_GetInfoKeyBuffer_Post(edict_t *e); #endif // FN_GetInfoKeyBuffer_Post #ifdef FN_InfoKeyValue_Post -char *FN_InfoKeyValue_Post(char *infobuffer, char *key); +char *FN_InfoKeyValue_Post(char *infobuffer, const char *key); #endif // FN_InfoKeyValue_Post #ifdef FN_SetKeyValue_Post -void FN_SetKeyValue_Post(char *infobuffer, char *key, char *value); +void FN_SetKeyValue_Post(char *infobuffer, const char *key, const char *value); #endif // FN_SetKeyValue_Post #ifdef FN_SetClientKeyValue_Post -void FN_SetClientKeyValue_Post(int clientIndex, char *infobuffer, char *key, char *value); +void FN_SetClientKeyValue_Post(int clientIndex, char *infobuffer, const char *key, const char *value); #endif // FN_SetClientKeyValue_Post #ifdef FN_IsMapValid_Post -int FN_IsMapValid_Post(char *filename); +int FN_IsMapValid_Post(const char *filename); #endif // FN_IsMapValid_Post #ifdef FN_StaticDecal_Post @@ -1855,7 +1876,7 @@ void FN_StaticDecal_Post(const float *origin, int decalIndex, int entityIndex, i #endif // FN_StaticDecal_Post #ifdef FN_PrecacheGeneric_Post -int FN_PrecacheGeneric_Post(char *s); +int FN_PrecacheGeneric_Post(const char *s); #endif // FN_PrecacheGeneric_Post #ifdef FN_GetPlayerUserId_Post @@ -1923,7 +1944,7 @@ void FN_DeltaUnsetField_Post(struct delta_s *pFields, const char *fieldname); #endif // FN_DeltaUnsetField_Post #ifdef FN_DeltaAddEncoder_Post -void FN_DeltaAddEncoder_Post(char *name, void (*conditionalencode)( struct delta_s *pFields, const unsigned char *from, const unsigned char *to ) ); +void FN_DeltaAddEncoder_Post(const char *name, void (*conditionalencode)( struct delta_s *pFields, const unsigned char *from, const unsigned char *to ) ); #endif // FN_DeltaAddEncoder_Post #ifdef FN_GetCurrentPlayer_Post @@ -1955,7 +1976,7 @@ int FN_engCreateInstancedBaseline_Post(int classname, struct entity_state_s *bas #endif // FN_engCreateInstancedBaseline_Post #ifdef FN_Cvar_DirectSet_Post -void FN_Cvar_DirectSet_Post(struct cvar_s *var, char *value); +void FN_Cvar_DirectSet_Post(struct cvar_s *var, const char *value); #endif // FN_Cvar_DirectSet_Post #ifdef FN_ForceUnmodified_Post @@ -2020,6 +2041,10 @@ int FN_ShouldCollide_Post(edict_t *pentTouched, edict_t *pentOther); void FN_AMXX_QUERY(void); #endif // FN_AMXX_QUERY +#ifdef FN_AMXX_CHECKGAME +int FN_AMXX_CHECKGAME(const char *); +#endif // FN_AMXX_CHECKGAME + #ifdef FN_AMXX_ATTACH void FN_AMXX_ATTACH(void); #endif // FN_AMXX_ATTACH @@ -2032,6 +2057,14 @@ void FN_AMXX_DETACH(void); void FN_AMXX_PLUGINSLOADED(void); #endif // FN_AMXX_PLUGINSLOADED +#ifdef FN_AMXX_PLUGINSUNLOADING +void FN_AMXX_PLUGINSUNLOADING(void); +#endif // FN_AMXX_PLUGINSUNLOADING + +#ifdef FN_AMXX_PLUGINSUNLOADED +void FN_AMXX_PLUGINSUNLOADED(void); +#endif // FN_AMXX_PLUGINSUNLOADED + // *** Types *** typedef void* (*PFN_REQ_FNPTR)(const char * /*name*/); @@ -2078,19 +2111,34 @@ enum PlayerProp Player_NewmenuPage, //int }; +enum LibType +{ + LibType_Library, + LibType_Class +}; + +#define MSGBLOCK_SET 0 +#define MSGBLOCK_GET 1 +#define BLOCK_NOT 0 +#define BLOCK_ONCE 1 +#define BLOCK_SET 2 + typedef void (*AUTHORIZEFUNC)(int player, const char *authstring); typedef int (*PFN_ADD_NATIVES) (const AMX_NATIVE_INFO * /*list*/); +typedef int (*PFN_ADD_NEW_NATIVES) (const AMX_NATIVE_INFO * /*list*/); typedef char * (*PFN_BUILD_PATHNAME) (const char * /*format*/, ...); typedef char * (*PFN_BUILD_PATHNAME_R) (char * /*buffer*/, size_t /* maxlen */, const char * /* format */, ...); typedef cell * (*PFN_GET_AMXADDR) (AMX * /*amx*/, cell /*offset*/); -typedef void (*PFN_PRINT_SRVCONSOLE) (char * /*format*/, ...); +typedef void (*PFN_PRINT_SRVCONSOLE) (const char * /*format*/, ...); typedef const char * (*PFN_GET_MODNAME) (void); typedef const char * (*PFN_GET_AMXSCRIPTNAME) (int /*id*/); typedef AMX * (*PFN_GET_AMXSCRIPT) (int /*id*/); typedef int (*PFN_FIND_AMXSCRIPT_BYAMX) (const AMX * /*amx*/); typedef int (*PFN_FIND_AMXSCRIPT_BYNAME) (const char * /*name*/); typedef int (*PFN_SET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, const char * /* source */, int /* max */); +typedef int (*PFN_SET_AMXSTRING_UTF8_CHAR) (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen); +typedef int (*PFN_SET_AMXSTRING_UTF8_CELL) (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen); typedef char * (*PFN_GET_AMXSTRING) (AMX * /*amx*/, cell /*amx_addr*/, int /*bufferId*/, int * /*pLen*/); typedef int (*PFN_GET_AMXSTRINGLEN) (const cell *ptr); typedef char * (*PFN_FORMAT_AMXSTRING) (AMX * /*amx*/, cell * /*params*/, int /*startParam*/, int * /*pLen*/); @@ -2143,8 +2191,8 @@ typedef void (*PFN_DEALLOCATOR) (const char* /*filename*/, const unsigned i typedef int (*PFN_AMX_EXEC) (AMX* /*amx*/, cell* /*return val*/, int /*index*/); typedef int (*PFN_AMX_EXECV) (AMX* /*amx*/, cell* /*return val*/, int /*index*/, int /*numparams*/, cell[] /*params*/); typedef int (*PFN_AMX_ALLOT) (AMX* /*amx*/, int /*length*/, cell* /*amx_addr*/, cell** /*phys_addr*/); -typedef int (*PFN_AMX_FINDPUBLIC) (AMX* /*amx*/, char* /*func name*/, int* /*index*/); -typedef int (*PFN_AMX_FINDNATIVE) (AMX* /*amx*/, char* /*func name*/, int* /*index*/); +typedef int (*PFN_AMX_FINDPUBLIC) (AMX* /*amx*/, const char* /*func name*/, int* /*index*/); +typedef int (*PFN_AMX_FINDNATIVE) (AMX* /*amx*/, const char* /*func name*/, int* /*index*/); typedef int (*PFN_LOAD_AMXSCRIPT) (AMX* /*amx*/, void** /*code*/, const char* /*path*/, char[64] /*error info*/, int /* debug */); typedef int (*PFN_UNLOAD_AMXSCRIPT) (AMX* /*amx*/,void** /*code*/); typedef cell (*PFN_REAL_TO_CELL) (REAL /*x*/); @@ -2159,8 +2207,17 @@ typedef int (*PFN_AMX_PUSH) (AMX * /*amx*/, cell /*value*/); typedef int (*PFN_SET_TEAM_INFO) (int /*player */, int /*teamid */, const char * /*name */); typedef void (*PFN_REG_AUTH_FUNC) (AUTHORIZEFUNC); typedef void (*PFN_UNREG_AUTH_FUNC) (AUTHORIZEFUNC); +typedef int (*PFN_FINDLIBRARY) (const char * /*name*/, LibType /*type*/); +typedef size_t (*PFN_ADDLIBRARIES) (const char * /*name*/, LibType /*type*/, void * /*parent*/); +typedef size_t (*PFN_REMOVELIBRARIES) (void * /*parent*/); +typedef void (*PFN_OVERRIDENATIVES) (AMX_NATIVE_INFO * /*natives*/, const char * /*myname*/); +typedef const char * (*PFN_GETLOCALINFO) (const char * /*name*/, const char * /*def*/); +typedef int (*PFN_AMX_REREGISTER) (AMX * /*amx*/, AMX_NATIVE_INFO * /*list*/, int /*list*/); +typedef void * (*PFN_REGISTERFUNCTIONEX) (void * /*pfn*/, const char * /*desc*/); +typedef void (*PFN_MESSAGE_BLOCK) (int /* mode */, int /* message */, int * /* opt */); extern PFN_ADD_NATIVES g_fn_AddNatives; +extern PFN_ADD_NEW_NATIVES g_fn_AddNewNatives; extern PFN_BUILD_PATHNAME g_fn_BuildPathname; extern PFN_BUILD_PATHNAME_R g_fn_BuildPathnameR; extern PFN_GET_AMXADDR g_fn_GetAmxAddr; @@ -2171,6 +2228,8 @@ extern PFN_GET_AMXSCRIPT g_fn_GetAmxScript; extern PFN_FIND_AMXSCRIPT_BYAMX g_fn_FindAmxScriptByAmx; extern PFN_FIND_AMXSCRIPT_BYNAME g_fn_FindAmxScriptByName; extern PFN_SET_AMXSTRING g_fn_SetAmxString; +extern PFN_SET_AMXSTRING_UTF8_CHAR g_fn_SetAmxStringUTF8Char; +extern PFN_SET_AMXSTRING_UTF8_CELL g_fn_SetAmxStringUTF8Cell; extern PFN_GET_AMXSTRING g_fn_GetAmxString; extern PFN_GET_AMXSTRINGLEN g_fn_GetAmxStringLen; extern PFN_FORMAT_AMXSTRING g_fn_FormatAmxString; @@ -2226,11 +2285,20 @@ extern PFN_SET_TEAM_INFO g_fn_SetTeamInfo; extern PFN_PLAYER_PROP_ADDR g_fn_PlayerPropAddr; extern PFN_REG_AUTH_FUNC g_fn_RegAuthFunc; extern PFN_UNREG_AUTH_FUNC g_fn_UnregAuthFunc; +extern PFN_FINDLIBRARY g_fn_FindLibrary; +extern PFN_ADDLIBRARIES g_fn_AddLibraries; +extern PFN_REMOVELIBRARIES g_fn_RemoveLibraries; +extern PFN_OVERRIDENATIVES g_fn_OverrideNatives; +extern PFN_GETLOCALINFO g_fn_GetLocalInfo; +extern PFN_AMX_REREGISTER g_fn_AmxReRegister; +extern PFN_REGISTERFUNCTIONEX g_fn_RegisterFunctionEx; +extern PFN_MESSAGE_BLOCK g_fn_MessageBlock; #ifdef MAY_NEVER_BE_DEFINED // Function prototypes for intellisense and similar systems // They understand #if 0 so we use #ifdef MAY_NEVER_BE_DEFINED int MF_AddNatives (const AMX_NATIVE_INFO *list) { } +int MF_AddNewNatives (const AMX_NATIVE_INFO *list) { } char * MF_BuildPathname (const char * format, ...) { } char * MF_BuildPathnameR (char *buffer, size_t maxlen, const char *fmt, ...) { } cell * MF_GetAmxAddr (AMX * amx, cell offset) { } @@ -2241,6 +2309,8 @@ AMX * MF_GetScriptAmx (int id) { } int MF_FindScriptByAmx (const AMX * amx) { } int MF_FindScriptByAmx (const char * name) { } int MF_SetAmxString (AMX * amx, cell amx_addr, const char * source , int max ) { } +int MF_SetAmxStringUTF8Char (AMX *amx, cell amx_addr, const char *source, size_t sourcelen, size_t maxlen) { } +int MF_SetAmxStringUTF8Cell (AMX *amx, cell amx_addr, const cell *source, size_t sourcelen, size_t maxlen) { } char * MF_GetAmxString (AMX * amx, cell amx_addr, int bufferId, int * pLen) { } int MF_GetAmxStringLen (const cell *ptr) { } char * MF_FormatAmxString (AMX * amx, cell * params, int startParam, int * pLen) { } @@ -2290,9 +2360,18 @@ int MF_SetPlayerTeamInfo (int id, int teamid, const char *teamname) { } void * MF_PlayerPropAddr (int id, int prop) { } void MF_RegAuthFunc (AUTHORIZEFUNC fn) { } void MF_UnregAuthFunc (AUTHORIZEFUNC fn) { } +int MF_FindLibrary (const char *name, LibType type) { } +size_t MF_AddLibraries (const char *name, LibType type, void *parent) { } +size_t MF_RemoveLibraries (void *parent) { } +void MF_OverrideNatives (AMX_NATIVE_INFO *natives, const char *myname) { } +const char * MF_GetLocalInfo (const char *name, const char *def) { } +int MF_AmxReRegister (AMX *amx, AMX_NATIVE_INFO *list, int number) { return 0; } +void * MF_RegisterFunctionEx (void *pfn, const char *description) { } +void * MF_MessageBlock (int mode, int msg, int *opt) { } #endif // MAY_NEVER_BE_DEFINED #define MF_AddNatives g_fn_AddNatives +#define MF_AddNewNatives g_fn_AddNewNatives #define MF_BuildPathname g_fn_BuildPathname #define MF_BuildPathnameR g_fn_BuildPathnameR #define MF_FormatAmxString g_fn_FormatAmxString @@ -2304,6 +2383,8 @@ void MF_UnregAuthFunc (AUTHORIZEFUNC fn) { } #define MF_FindScriptByAmx g_fn_FindAmxScriptByAmx #define MF_FindScriptByName g_fn_FindAmxScriptByName #define MF_SetAmxString g_fn_SetAmxString +#define MF_SetAmxStringUTF8Char g_fn_SetAmxStringUTF8Char +#define MF_SetAmxStringUTF8Cell g_fn_SetAmxStringUTF8Cell #define MF_GetAmxString g_fn_GetAmxString #define MF_GetAmxStringLen g_fn_GetAmxStringLen #define MF_CopyAmxMemory g_fn_CopyAmxMemory @@ -2359,6 +2440,14 @@ void MF_LogError(AMX *amx, int err, const char *fmt, ...); #define MF_PlayerPropAddr g_fn_PlayerPropAddr #define MF_RegAuthFunc g_fn_RegAuthFunc #define MF_UnregAuthFunc g_fn_UnregAuthFunc +#define MF_FindLibrary g_fn_FindLibrary +#define MF_AddLibraries g_fn_AddLibraries +#define MF_RemoveLibraries g_fn_RemoveLibraries +#define MF_OverrideNatives g_fn_OverrideNatives +#define MF_GetLocalInfo g_fn_GetLocalInfo +#define MF_AmxReRegister g_fn_AmxReRegister +#define MF_RegisterFunctionEx g_fn_RegisterFunctionEx +#define MF_MessageBlock g_fn_MessageBlock #ifdef MEMORY_TEST /*** Memory ***/ diff --git a/dlls/cstrike/csx/WinCSX/moduleconfig.h b/dlls/cstrike/csx/WinCSX/moduleconfig.h index 56b8afc5..fe669ad3 100755 --- a/dlls/cstrike/csx/WinCSX/moduleconfig.h +++ b/dlls/cstrike/csx/WinCSX/moduleconfig.h @@ -1,4 +1,15 @@ -// Configuration +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module Config +// #ifndef __MODULECONFIG_H__ #define __MODULECONFIG_H__ diff --git a/dlls/cstrike/csx/WinCSX/resources/Resource.h b/dlls/cstrike/csx/WinCSX/resources/Resource.h index c197fc36..7c88fec8 100755 --- a/dlls/cstrike/csx/WinCSX/resources/Resource.h +++ b/dlls/cstrike/csx/WinCSX/resources/Resource.h @@ -1,7 +1,12 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by WinCSX.rc +// vim: set ts=4 sw=4 tw=99 noet: // +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #define IDC_MYICON 2 #define IDM_VISUALSTYLES 1 #define IDD_WINCSX_DIALOG 102 diff --git a/dlls/cstrike/csx/meta_api.cpp b/dlls/cstrike/csx/meta_api.cpp index e58d81d8..479eaa9e 100755 --- a/dlls/cstrike/csx/meta_api.cpp +++ b/dlls/cstrike/csx/meta_api.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// CSX Module +// + #include "amxxmodule.h" #include "rank.h" diff --git a/dlls/cstrike/csx/rank.cpp b/dlls/cstrike/csx/rank.cpp index fb629aea..93ac7b2c 100755 --- a/dlls/cstrike/csx/rank.cpp +++ b/dlls/cstrike/csx/rank.cpp @@ -1,4 +1,15 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license +// +// CSX Module +// #include "amxxmodule.h" #include "rank.h" diff --git a/dlls/cstrike/csx/rank.h b/dlls/cstrike/csx/rank.h index c9e4c1bc..2b694028 100755 --- a/dlls/cstrike/csx/rank.h +++ b/dlls/cstrike/csx/rank.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// CSX Module +// + #ifndef RANK_H #define RANK_H diff --git a/dlls/cstrike/csx/sdk/amxxmodule.cpp b/dlls/cstrike/csx/sdk/amxxmodule.cpp index efb933b3..7de02e6e 100755 --- a/dlls/cstrike/csx/sdk/amxxmodule.cpp +++ b/dlls/cstrike/csx/sdk/amxxmodule.cpp @@ -1,36 +1,16 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* Parts Copyright (C) 2001-2003 Will Day -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -* -* Description: AMX Mod X Module Interface Functions -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Parts Copyright (C) 2001-2003 Will Day +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module SDK +// #include #include diff --git a/dlls/cstrike/csx/sdk/amxxmodule.h b/dlls/cstrike/csx/sdk/amxxmodule.h index 3ca8c7b6..6a760b25 100755 --- a/dlls/cstrike/csx/sdk/amxxmodule.h +++ b/dlls/cstrike/csx/sdk/amxxmodule.h @@ -1,7 +1,16 @@ -/* - * AMX Mod X Module Interface Functions - * This file may be freely used -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license +// + +// +// Module SDK +// // prevent double include #ifndef __AMXXMODULE_H__ diff --git a/dlls/cstrike/csx/sdk/moduleconfig.h b/dlls/cstrike/csx/sdk/moduleconfig.h index 5c0cf65c..f2070e6e 100755 --- a/dlls/cstrike/csx/sdk/moduleconfig.h +++ b/dlls/cstrike/csx/sdk/moduleconfig.h @@ -1,4 +1,15 @@ -// Configuration +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module Config +// #ifndef __MODULECONFIG_H__ #define __MODULECONFIG_H__ diff --git a/dlls/cstrike/csx/usermsg.cpp b/dlls/cstrike/csx/usermsg.cpp index f8a140c9..5cb463b4 100755 --- a/dlls/cstrike/csx/usermsg.cpp +++ b/dlls/cstrike/csx/usermsg.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// CSX Module +// + #include "amxxmodule.h" #include "rank.h" diff --git a/dlls/dod/dodfun/CMisc.cpp b/dlls/dod/dodfun/CMisc.cpp index fc496311..f4ca3b8b 100755 --- a/dlls/dod/dodfun/CMisc.cpp +++ b/dlls/dod/dodfun/CMisc.cpp @@ -1,33 +1,16 @@ -/* - * dodfun - * Copyright (c) 2004 Lukasz Wlasinski - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// DoD Fun Module +// #include "amxxmodule.h" #include "CMisc.h" diff --git a/dlls/dod/dodfun/CMisc.h b/dlls/dod/dodfun/CMisc.h index 93ff14ea..7e2f6d06 100755 --- a/dlls/dod/dodfun/CMisc.h +++ b/dlls/dod/dodfun/CMisc.h @@ -1,33 +1,16 @@ -/* - * dodfun - * Copyright (c) 2004 Lukasz Wlasinski - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// DoD Fun Module +// #ifndef CMISC_H #define CMISC_H diff --git a/dlls/dod/dodfun/NBase.cpp b/dlls/dod/dodfun/NBase.cpp index f15cc8ca..21e40dc2 100755 --- a/dlls/dod/dodfun/NBase.cpp +++ b/dlls/dod/dodfun/NBase.cpp @@ -1,33 +1,16 @@ -/* - * dodfun - * Copyright (c) 2004 Lukasz Wlasinski - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// DoD Fun Module +// #include "amxxmodule.h" #include "dodfun.h" diff --git a/dlls/dod/dodfun/NPD.cpp b/dlls/dod/dodfun/NPD.cpp index 01dff499..4af5eda2 100755 --- a/dlls/dod/dodfun/NPD.cpp +++ b/dlls/dod/dodfun/NPD.cpp @@ -1,33 +1,16 @@ -/* - * dodfun - * Copyright (c) 2004 Lukasz Wlasinski - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// DoD Fun Module +// #include "amxxmodule.h" #include "dodfun.h" diff --git a/dlls/dod/dodfun/Utils.cpp b/dlls/dod/dodfun/Utils.cpp index c1d82b7e..219c887c 100755 --- a/dlls/dod/dodfun/Utils.cpp +++ b/dlls/dod/dodfun/Utils.cpp @@ -1,33 +1,16 @@ -/* - * dodfun - * Copyright (c) 2004 Lukasz Wlasinski - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// DoD Fun Module +// #include "amxxmodule.h" #include "dodfun.h" diff --git a/dlls/dod/dodfun/dodfun.h b/dlls/dod/dodfun/dodfun.h index 3cfbd31f..eacbcd00 100755 --- a/dlls/dod/dodfun/dodfun.h +++ b/dlls/dod/dodfun/dodfun.h @@ -1,33 +1,16 @@ -/* - * dodfun - * Copyright (c) 2004 Lukasz Wlasinski - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// DoD Fun Module +// #ifndef DODFUN_H #define DODFUN_H diff --git a/dlls/dod/dodfun/moduleconfig.cpp b/dlls/dod/dodfun/moduleconfig.cpp index 742ab79a..e4b957a7 100755 --- a/dlls/dod/dodfun/moduleconfig.cpp +++ b/dlls/dod/dodfun/moduleconfig.cpp @@ -1,33 +1,16 @@ -/* - * dodfun - * Copyright (c) 2004 Lukasz Wlasinski - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// DoD Fun Module +// #include #include "amxxmodule.h" diff --git a/dlls/dod/dodfun/sdk/amxxmodule.cpp b/dlls/dod/dodfun/sdk/amxxmodule.cpp index efb933b3..7de02e6e 100755 --- a/dlls/dod/dodfun/sdk/amxxmodule.cpp +++ b/dlls/dod/dodfun/sdk/amxxmodule.cpp @@ -1,36 +1,16 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* Parts Copyright (C) 2001-2003 Will Day -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -* -* Description: AMX Mod X Module Interface Functions -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Parts Copyright (C) 2001-2003 Will Day +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module SDK +// #include #include diff --git a/dlls/dod/dodfun/sdk/amxxmodule.h b/dlls/dod/dodfun/sdk/amxxmodule.h index 3ca8c7b6..6a760b25 100755 --- a/dlls/dod/dodfun/sdk/amxxmodule.h +++ b/dlls/dod/dodfun/sdk/amxxmodule.h @@ -1,7 +1,16 @@ -/* - * AMX Mod X Module Interface Functions - * This file may be freely used -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license +// + +// +// Module SDK +// // prevent double include #ifndef __AMXXMODULE_H__ diff --git a/dlls/dod/dodfun/sdk/moduleconfig.h b/dlls/dod/dodfun/sdk/moduleconfig.h index c65407f0..7a0316a4 100755 --- a/dlls/dod/dodfun/sdk/moduleconfig.h +++ b/dlls/dod/dodfun/sdk/moduleconfig.h @@ -1,4 +1,15 @@ -// Configuration +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module Config +// #ifndef __MODULECONFIG_H__ #define __MODULECONFIG_H__ diff --git a/dlls/dod/dodfun/usermsg.cpp b/dlls/dod/dodfun/usermsg.cpp index 00de386d..ca592fe8 100755 --- a/dlls/dod/dodfun/usermsg.cpp +++ b/dlls/dod/dodfun/usermsg.cpp @@ -1,33 +1,16 @@ -/* - * DoDFun - * Copyright (c) 2004 £ukasz W³asiñski - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// DoD Fun Module +// #include "amxxmodule.h" #include "dodfun.h" diff --git a/dlls/dod/dodx/CMisc.cpp b/dlls/dod/dodx/CMisc.cpp index b281202a..7a2cdcaa 100755 --- a/dlls/dod/dodx/CMisc.cpp +++ b/dlls/dod/dodx/CMisc.cpp @@ -1,33 +1,16 @@ -/* - * DoDx - * Copyright (c) 2004 Lukasz Wlasinski - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// DODX Module +// #include "amxxmodule.h" #include "CMisc.h" diff --git a/dlls/dod/dodx/CMisc.h b/dlls/dod/dodx/CMisc.h index 17241d15..366454ee 100755 --- a/dlls/dod/dodx/CMisc.h +++ b/dlls/dod/dodx/CMisc.h @@ -1,33 +1,16 @@ -/* - * DoDX - * Copyright (c) 2004 Lukasz Wlasinski - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// DODX Module +// #ifndef CMISC_H #define CMISC_H diff --git a/dlls/dod/dodx/CRank.cpp b/dlls/dod/dodx/CRank.cpp index 82794da7..8a5b7462 100755 --- a/dlls/dod/dodx/CRank.cpp +++ b/dlls/dod/dodx/CRank.cpp @@ -1,33 +1,16 @@ -/* - * DoDX - * Copyright (c) 2004 Lukasz Wlasinski - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// DODX Module +// #include "amxxmodule.h" #include "CRank.h" diff --git a/dlls/dod/dodx/CRank.h b/dlls/dod/dodx/CRank.h index dc77a09b..f354eedc 100755 --- a/dlls/dod/dodx/CRank.h +++ b/dlls/dod/dodx/CRank.h @@ -1,33 +1,16 @@ -/* - * DoDX - * Copyright (c) 2004 Lukasz Wlasinski - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// DODX Module +// #ifndef CRANK_H #define CRANK_H diff --git a/dlls/dod/dodx/NBase.cpp b/dlls/dod/dodx/NBase.cpp index 74028d9e..66b51d82 100755 --- a/dlls/dod/dodx/NBase.cpp +++ b/dlls/dod/dodx/NBase.cpp @@ -1,33 +1,16 @@ -/* - * DoDX - * Copyright (c) 2004 Lukasz Wlasinski - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// DODX Module +// #include "amxxmodule.h" #include "dodx.h" diff --git a/dlls/dod/dodx/NRank.cpp b/dlls/dod/dodx/NRank.cpp index e999327a..6e34cb57 100755 --- a/dlls/dod/dodx/NRank.cpp +++ b/dlls/dod/dodx/NRank.cpp @@ -1,33 +1,16 @@ -/* - * DoDX - * Copyright (c) 2004 Lukasz Wlasinski - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// DODX Module +// #include "amxxmodule.h" #include "dodx.h" diff --git a/dlls/dod/dodx/Utils.cpp b/dlls/dod/dodx/Utils.cpp index 5879c869..fe71a87c 100755 --- a/dlls/dod/dodx/Utils.cpp +++ b/dlls/dod/dodx/Utils.cpp @@ -1,33 +1,16 @@ -/* - * DoDX - * Copyright (c) 2004 Lukasz Wlasinski - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// DODX Module +// #include "amxxmodule.h" #include "dodx.h" diff --git a/dlls/dod/dodx/dodx.h b/dlls/dod/dodx/dodx.h index c7bf325b..f6b1e3ef 100755 --- a/dlls/dod/dodx/dodx.h +++ b/dlls/dod/dodx/dodx.h @@ -1,33 +1,16 @@ -/* - * DoDX - * Copyright (c) 2004 Lukasz Wlasinski - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// DODX Module +// #ifndef DODX_H #define DODX_H diff --git a/dlls/dod/dodx/moduleconfig.cpp b/dlls/dod/dodx/moduleconfig.cpp index 82d5fae3..ffa0e2e8 100755 --- a/dlls/dod/dodx/moduleconfig.cpp +++ b/dlls/dod/dodx/moduleconfig.cpp @@ -1,33 +1,16 @@ -/* - * DoDX - * Copyright (c) 2004 Lukasz Wlasinski - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// DODX Module +// #include "amxxmodule.h" #include "dodx.h" diff --git a/dlls/dod/dodx/sdk/amxxmodule.cpp b/dlls/dod/dodx/sdk/amxxmodule.cpp index efb933b3..7de02e6e 100755 --- a/dlls/dod/dodx/sdk/amxxmodule.cpp +++ b/dlls/dod/dodx/sdk/amxxmodule.cpp @@ -1,36 +1,16 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* Parts Copyright (C) 2001-2003 Will Day -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -* -* Description: AMX Mod X Module Interface Functions -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Parts Copyright (C) 2001-2003 Will Day +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module SDK +// #include #include diff --git a/dlls/dod/dodx/sdk/amxxmodule.h b/dlls/dod/dodx/sdk/amxxmodule.h index 3ca8c7b6..6a760b25 100755 --- a/dlls/dod/dodx/sdk/amxxmodule.h +++ b/dlls/dod/dodx/sdk/amxxmodule.h @@ -1,7 +1,16 @@ -/* - * AMX Mod X Module Interface Functions - * This file may be freely used -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license +// + +// +// Module SDK +// // prevent double include #ifndef __AMXXMODULE_H__ diff --git a/dlls/dod/dodx/sdk/moduleconfig.h b/dlls/dod/dodx/sdk/moduleconfig.h index 75d3c809..f32329e6 100755 --- a/dlls/dod/dodx/sdk/moduleconfig.h +++ b/dlls/dod/dodx/sdk/moduleconfig.h @@ -1,4 +1,15 @@ -// Configuration +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module Config +// #ifndef __MODULECONFIG_H__ #define __MODULECONFIG_H__ diff --git a/dlls/dod/dodx/usermsg.cpp b/dlls/dod/dodx/usermsg.cpp index b663f33c..bbcf3b0c 100755 --- a/dlls/dod/dodx/usermsg.cpp +++ b/dlls/dod/dodx/usermsg.cpp @@ -1,33 +1,17 @@ -/* - * DoDX - * Copyright (c) 2004 Lukasz Wlasinski - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// DODX Module +// + #include "amxxmodule.h" #include "dodx.h" diff --git a/dlls/engine/amxxapi.cpp b/dlls/engine/amxxapi.cpp index 551a5f36..ae1e53a2 100755 --- a/dlls/engine/amxxapi.cpp +++ b/dlls/engine/amxxapi.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Engine Module +// + #include "engine.h" BOOL CheckForPublic(const char *publicname); diff --git a/dlls/engine/engine.cpp b/dlls/engine/engine.cpp index 24e38bea..3e147c74 100755 --- a/dlls/engine/engine.cpp +++ b/dlls/engine/engine.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Engine Module +// + #include "engine.h" struct usercmd_s *g_cmd; diff --git a/dlls/engine/engine.h b/dlls/engine/engine.h index 2eacf4f9..4e486a4e 100755 --- a/dlls/engine/engine.h +++ b/dlls/engine/engine.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Engine Module +// + #ifndef _ENGINE_INCLUDE_H #define _ENGINE_INCLUDE_H diff --git a/dlls/engine/entity.cpp b/dlls/engine/entity.cpp index 09bb6bac..f5bff2c5 100755 --- a/dlls/engine/entity.cpp +++ b/dlls/engine/entity.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Engine Module +// + #include "entity.h" int is_ent_valid(int iEnt) diff --git a/dlls/engine/entity.h b/dlls/engine/entity.h index cc7169a1..a0497296 100755 --- a/dlls/engine/entity.h +++ b/dlls/engine/entity.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Engine Module +// + #ifndef _INCLUDE_ENGINE_ENTSTUFF #define _INCLUDE_ENGINE_ENTSTUFF diff --git a/dlls/engine/forwards.cpp b/dlls/engine/forwards.cpp index aa7f1069..0d47326a 100755 --- a/dlls/engine/forwards.cpp +++ b/dlls/engine/forwards.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Engine Module +// + #include "engine.h" bool incmd = false; diff --git a/dlls/engine/globals.cpp b/dlls/engine/globals.cpp index 728f9736..3b8a281d 100755 --- a/dlls/engine/globals.cpp +++ b/dlls/engine/globals.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Engine Module +// + #include "gpglobals.h" static cell AMX_NATIVE_CALL get_global_float(AMX *amx, cell *params) diff --git a/dlls/engine/gpglobals.h b/dlls/engine/gpglobals.h index 61af3b5e..6aa73ded 100755 --- a/dlls/engine/gpglobals.h +++ b/dlls/engine/gpglobals.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Engine Module +// + #ifndef _INCLUDE_ENGINE_GLOBAL #define _INCLUDE_ENGINE_GLOBAL diff --git a/dlls/engine/sdk/CString.h b/dlls/engine/sdk/CString.h index 1c2c5789..9f9b63f3 100755 --- a/dlls/engine/sdk/CString.h +++ b/dlls/engine/sdk/CString.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef _INCLUDE_CSTRING_H #define _INCLUDE_CSTRING_H diff --git a/dlls/engine/sdk/CVector.h b/dlls/engine/sdk/CVector.h index 24355d4e..44241413 100755 --- a/dlls/engine/sdk/CVector.h +++ b/dlls/engine/sdk/CVector.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef __CVECTOR_H__ #define __CVECTOR_H__ diff --git a/dlls/engine/sdk/amxxmodule.cpp b/dlls/engine/sdk/amxxmodule.cpp index efb933b3..7de02e6e 100755 --- a/dlls/engine/sdk/amxxmodule.cpp +++ b/dlls/engine/sdk/amxxmodule.cpp @@ -1,36 +1,16 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* Parts Copyright (C) 2001-2003 Will Day -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -* -* Description: AMX Mod X Module Interface Functions -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Parts Copyright (C) 2001-2003 Will Day +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module SDK +// #include #include diff --git a/dlls/engine/sdk/amxxmodule.h b/dlls/engine/sdk/amxxmodule.h index 3ca8c7b6..6a760b25 100755 --- a/dlls/engine/sdk/amxxmodule.h +++ b/dlls/engine/sdk/amxxmodule.h @@ -1,7 +1,16 @@ -/* - * AMX Mod X Module Interface Functions - * This file may be freely used -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license +// + +// +// Module SDK +// // prevent double include #ifndef __AMXXMODULE_H__ diff --git a/dlls/engine/sdk/moduleconfig.h b/dlls/engine/sdk/moduleconfig.h index b71dfce8..932731c7 100755 --- a/dlls/engine/sdk/moduleconfig.h +++ b/dlls/engine/sdk/moduleconfig.h @@ -1,4 +1,15 @@ -// Configuration +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module Config +// #ifndef __MODULECONFIG_H__ #define __MODULECONFIG_H__ diff --git a/dlls/fakemeta/dllfunc.cpp b/dlls/fakemeta/dllfunc.cpp index 42930843..8aa0429d 100755 --- a/dlls/fakemeta/dllfunc.cpp +++ b/dlls/fakemeta/dllfunc.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Fakemeta Module +// + #include "fakemeta_amxx.h" //by mahnsawce from his NS module diff --git a/dlls/fakemeta/dllfunc.h b/dlls/fakemeta/dllfunc.h index e581237f..268c94ab 100755 --- a/dlls/fakemeta/dllfunc.h +++ b/dlls/fakemeta/dllfunc.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Fakemeta Module +// + #ifndef _INCLUDE_DLLFUNC_H #define _INCLUDE_DLLFUNC_H diff --git a/dlls/fakemeta/engfunc.cpp b/dlls/fakemeta/engfunc.cpp index 791754e7..479b8295 100755 --- a/dlls/fakemeta/engfunc.cpp +++ b/dlls/fakemeta/engfunc.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Fakemeta Module +// + #include "fakemeta_amxx.h" TraceResult g_tr; diff --git a/dlls/fakemeta/engfunc.h b/dlls/fakemeta/engfunc.h index 9d7e749b..d5c43d14 100755 --- a/dlls/fakemeta/engfunc.h +++ b/dlls/fakemeta/engfunc.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Fakemeta Module +// + #ifndef _ENGFUNC_INCLUDE_H #define _ENGFUNC_INCLUDE_H diff --git a/dlls/fakemeta/fakemeta_amxx.cpp b/dlls/fakemeta/fakemeta_amxx.cpp index 5de5573c..67e9e611 100755 --- a/dlls/fakemeta/fakemeta_amxx.cpp +++ b/dlls/fakemeta/fakemeta_amxx.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Fakemeta Module +// + #include "fakemeta_amxx.h" #include "sh_stack.h" diff --git a/dlls/fakemeta/fakemeta_amxx.h b/dlls/fakemeta/fakemeta_amxx.h index 4bc72ccf..4da06c53 100755 --- a/dlls/fakemeta/fakemeta_amxx.h +++ b/dlls/fakemeta/fakemeta_amxx.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Fakemeta Module +// + #ifndef _FAKEMETA_INCLUDE_H #define _FAKEMETA_INCLUDE_H diff --git a/dlls/fakemeta/fm_tr.cpp b/dlls/fakemeta/fm_tr.cpp index 8ac044f5..bf0c6c34 100755 --- a/dlls/fakemeta/fm_tr.cpp +++ b/dlls/fakemeta/fm_tr.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Fakemeta Module +// + #include "fakemeta_amxx.h" TraceResult *gfm_tr; diff --git a/dlls/fakemeta/fm_tr.h b/dlls/fakemeta/fm_tr.h index 5b687026..8eaf8c00 100755 --- a/dlls/fakemeta/fm_tr.h +++ b/dlls/fakemeta/fm_tr.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Fakemeta Module +// + #ifndef _INCLUDE_TR_H #define _INCLUDE_TR_H diff --git a/dlls/fakemeta/fm_tr2.cpp b/dlls/fakemeta/fm_tr2.cpp index c553caa3..cbf669fb 100644 --- a/dlls/fakemeta/fm_tr2.cpp +++ b/dlls/fakemeta/fm_tr2.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Fakemeta Module +// + #include "fakemeta_amxx.h" #include "sh_stack.h" diff --git a/dlls/fakemeta/forward.cpp b/dlls/fakemeta/forward.cpp index 009b9302..0c231d2e 100755 --- a/dlls/fakemeta/forward.cpp +++ b/dlls/fakemeta/forward.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Fakemeta Module +// + #include "fakemeta_amxx.h" CVector Engine[ENGFUNC_NUM+10]; diff --git a/dlls/fakemeta/forward.h b/dlls/fakemeta/forward.h index a804a3e8..310869bc 100755 --- a/dlls/fakemeta/forward.h +++ b/dlls/fakemeta/forward.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Fakemeta Module +// + #ifndef _INCLUDE_FORWARD_H #define _INCLUDE_FORWARD_H diff --git a/dlls/fakemeta/forwardmacros.h b/dlls/fakemeta/forwardmacros.h index a542e301..eada3b9e 100755 --- a/dlls/fakemeta/forwardmacros.h +++ b/dlls/fakemeta/forwardmacros.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Fakemeta Module +// + #ifndef FORWARDMACROS_H #define FORWARDMACROS_H diff --git a/dlls/fakemeta/glb.cpp b/dlls/fakemeta/glb.cpp index 7cea37a8..d03c13e4 100644 --- a/dlls/fakemeta/glb.cpp +++ b/dlls/fakemeta/glb.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Fakemeta Module +// + #include "fakemeta_amxx.h" static int g_glob_offset_table[glb_end_pchar] = {-1}; diff --git a/dlls/fakemeta/glb.h b/dlls/fakemeta/glb.h index 7725573d..26a71a78 100644 --- a/dlls/fakemeta/glb.h +++ b/dlls/fakemeta/glb.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Fakemeta Module +// + #ifndef _INCLUDE_GLB_H #define _INCLUDE_GLB_H diff --git a/dlls/fakemeta/misc.cpp b/dlls/fakemeta/misc.cpp index c9399830..92e4a0c9 100644 --- a/dlls/fakemeta/misc.cpp +++ b/dlls/fakemeta/misc.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Fakemeta Module +// + #include "fakemeta_amxx.h" #include // HLSDK, for the animation natives diff --git a/dlls/fakemeta/pdata.cpp b/dlls/fakemeta/pdata.cpp index 6403635a..bc4b183c 100755 --- a/dlls/fakemeta/pdata.cpp +++ b/dlls/fakemeta/pdata.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Fakemeta Module +// + #include "fakemeta_amxx.h" #if defined PAWN_CELL_SIZE diff --git a/dlls/fakemeta/pev.cpp b/dlls/fakemeta/pev.cpp index 63538318..5d41be5c 100755 --- a/dlls/fakemeta/pev.cpp +++ b/dlls/fakemeta/pev.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Fakemeta Module +// + #include "fakemeta_amxx.h" /** Optimizations for Fakemeta. In the end we'll do this for other things too. diff --git a/dlls/fakemeta/pev.h b/dlls/fakemeta/pev.h index 00369f7f..46febd83 100755 --- a/dlls/fakemeta/pev.h +++ b/dlls/fakemeta/pev.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Fakemeta Module +// + #ifndef _INCLUDE_PEV_H #define _INCLUDE_PEV_H diff --git a/dlls/fakemeta/sdk/CString.h b/dlls/fakemeta/sdk/CString.h index 18f68737..8c6ebc95 100755 --- a/dlls/fakemeta/sdk/CString.h +++ b/dlls/fakemeta/sdk/CString.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef _INCLUDE_CSTRING_H #define _INCLUDE_CSTRING_H diff --git a/dlls/fakemeta/sdk/CVector.h b/dlls/fakemeta/sdk/CVector.h index 24355d4e..44241413 100755 --- a/dlls/fakemeta/sdk/CVector.h +++ b/dlls/fakemeta/sdk/CVector.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef __CVECTOR_H__ #define __CVECTOR_H__ diff --git a/dlls/fakemeta/sdk/amxxmodule.cpp b/dlls/fakemeta/sdk/amxxmodule.cpp index efb933b3..7de02e6e 100755 --- a/dlls/fakemeta/sdk/amxxmodule.cpp +++ b/dlls/fakemeta/sdk/amxxmodule.cpp @@ -1,36 +1,16 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* Parts Copyright (C) 2001-2003 Will Day -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -* -* Description: AMX Mod X Module Interface Functions -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Parts Copyright (C) 2001-2003 Will Day +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module SDK +// #include #include diff --git a/dlls/fakemeta/sdk/amxxmodule.h b/dlls/fakemeta/sdk/amxxmodule.h index 3ca8c7b6..6a760b25 100755 --- a/dlls/fakemeta/sdk/amxxmodule.h +++ b/dlls/fakemeta/sdk/amxxmodule.h @@ -1,7 +1,16 @@ -/* - * AMX Mod X Module Interface Functions - * This file may be freely used -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license +// + +// +// Module SDK +// // prevent double include #ifndef __AMXXMODULE_H__ diff --git a/dlls/fakemeta/sdk/moduleconfig.h b/dlls/fakemeta/sdk/moduleconfig.h index ea9804b9..95aceb5f 100755 --- a/dlls/fakemeta/sdk/moduleconfig.h +++ b/dlls/fakemeta/sdk/moduleconfig.h @@ -1,4 +1,15 @@ -// Configuration +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module Config +// #ifndef __MODULECONFIG_H__ #define __MODULECONFIG_H__ diff --git a/dlls/fun/fun.cpp b/dlls/fun/fun.cpp index 9f00196e..e7adb097 100755 --- a/dlls/fun/fun.cpp +++ b/dlls/fun/fun.cpp @@ -1,35 +1,15 @@ -/* AMX Mod X -* Fun Module -* -* by the AMX Mod X Development Team -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Fun Module +// #include #include "fun.h" diff --git a/dlls/fun/fun.h b/dlls/fun/fun.h index 738c7fc6..7b942a35 100755 --- a/dlls/fun/fun.h +++ b/dlls/fun/fun.h @@ -1,35 +1,16 @@ -/* AMX Mod X -* Fun Module -* -* by the AMX Mod X Development Team -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Fun Module +// + #include "amxxmodule.h" // Fun-specific defines below diff --git a/dlls/fun/sdk/amxxmodule.cpp b/dlls/fun/sdk/amxxmodule.cpp index efb933b3..7de02e6e 100755 --- a/dlls/fun/sdk/amxxmodule.cpp +++ b/dlls/fun/sdk/amxxmodule.cpp @@ -1,36 +1,16 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* Parts Copyright (C) 2001-2003 Will Day -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -* -* Description: AMX Mod X Module Interface Functions -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Parts Copyright (C) 2001-2003 Will Day +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module SDK +// #include #include diff --git a/dlls/fun/sdk/amxxmodule.h b/dlls/fun/sdk/amxxmodule.h index 3ca8c7b6..6a760b25 100755 --- a/dlls/fun/sdk/amxxmodule.h +++ b/dlls/fun/sdk/amxxmodule.h @@ -1,7 +1,16 @@ -/* - * AMX Mod X Module Interface Functions - * This file may be freely used -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license +// + +// +// Module SDK +// // prevent double include #ifndef __AMXXMODULE_H__ diff --git a/dlls/fun/sdk/moduleconfig.h b/dlls/fun/sdk/moduleconfig.h index 5c0883d1..a326ecde 100755 --- a/dlls/fun/sdk/moduleconfig.h +++ b/dlls/fun/sdk/moduleconfig.h @@ -1,4 +1,16 @@ -// Configuration +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license +// + +// +// Module Config +// #ifndef __MODULECONFIG_H__ #define __MODULECONFIG_H__ diff --git a/dlls/geoip/AMBuilder b/dlls/geoip/AMBuilder index cd3ce025..3bc50513 100644 --- a/dlls/geoip/AMBuilder +++ b/dlls/geoip/AMBuilder @@ -1,15 +1,22 @@ # vim: set sts=2 ts=8 sw=2 tw=99 et ft=python: import os.path -binary = AMXX.Module(builder, 'geoip') +binary = AMXX.MetaModule(builder, 'geoip') + +binary.compiler.defines += [ + 'HAVE_STDINT_H' +] binary.sources = [ 'sdk/amxxmodule.cpp', - 'GeoIP.c', - 'geoip_amxx.cpp', + 'GeoIP2/maxminddb.cpp', + 'geoip_main.cpp', + 'geoip_natives.cpp', + 'geoip_util.cpp', ] if builder.target_platform == 'windows': binary.compiler.postlink += ['ws2_32.lib'] + binary.compiler.includes += [os.path.join(builder.sourcePath, 'dlls', 'geoip', 'GeoIP2')] AMXX.modules += [builder.Add(binary)] diff --git a/dlls/geoip/GeoIP.c b/dlls/geoip/GeoIP.c deleted file mode 100755 index 4fcfd2e6..00000000 --- a/dlls/geoip/GeoIP.c +++ /dev/null @@ -1,991 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 2 -*- */ -/* GeoIP.c - * - * Copyright (C) 2006 MaxMind LLC - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#define GEOIPDATADIR "" - -#include "GeoIP.h" - -#ifndef WIN32 -#include -#include -#include /* For ntohl */ -#include -#else -#include -#define snprintf _snprintf -#endif -#include -#include -#include -#include -#include -#include /* for fstat */ -#include /* for fstat */ - -#ifdef HAVE_STDINT_H -#include /* For uint32_t */ -#endif - -#ifndef INADDR_NONE -#define INADDR_NONE -1 -#endif - -#define COUNTRY_BEGIN 16776960 -#define STATE_BEGIN_REV0 16700000 -#define STATE_BEGIN_REV1 16000000 -#define STRUCTURE_INFO_MAX_SIZE 20 -#define DATABASE_INFO_MAX_SIZE 100 -#define MAX_ORG_RECORD_LENGTH 300 -#define US_OFFSET 1 -#define CANADA_OFFSET 677 -#define WORLD_OFFSET 1353 -#define FIPS_RANGE 360 - -#define CHECK_ERR(err, msg) { \ - if (err != Z_OK) { \ - fprintf(stderr, "%s error: %d\n", msg, err); \ - exit(1); \ - } \ -} - -const char GeoIP_country_code[251][3] = { "--","AP","EU","AD","AE","AF","AG","AI","AL","AM","AN", - "AO","AQ","AR","AS","AT","AU","AW","AZ","BA","BB", - "BD","BE","BF","BG","BH","BI","BJ","BM","BN","BO", - "BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD", - "CF","CG","CH","CI","CK","CL","CM","CN","CO","CR", - "CU","CV","CX","CY","CZ","DE","DJ","DK","DM","DO", - "DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ", - "FK","FM","FO","FR","FX","GA","GB","GD","GE","GF", - "GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT", - "GU","GW","GY","HK","HM","HN","HR","HT","HU","ID", - "IE","IL","IN","IO","IQ","IR","IS","IT","JM","JO", - "JP","KE","KG","KH","KI","KM","KN","KP","KR","KW", - "KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT", - "LU","LV","LY","MA","MC","MD","MG","MH","MK","ML", - "MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV", - "MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI", - "NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF", - "PG","PH","PK","PL","PM","PN","PR","PS","PT","PW", - "PY","QA","RE","RO","RU","RW","SA","SB","SC","SD", - "SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO", - "SR","ST","SV","SY","SZ","TC","TD","TF","TG","TH", - "TJ","TK","TM","TN","TO","TL","TR","TT","TV","TW", - "TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE", - "VG","VI","VN","VU","WF","WS","YE","YT","RS","ZA", - "ZM","ME","ZW","A1","A2","O1","AX","GG","IM","JE"}; - -const char GeoIP_country_code3[251][4] = { "--","AP","EU","AND","ARE","AFG","ATG","AIA","ALB","ARM","ANT", - "AGO","AQ","ARG","ASM","AUT","AUS","ABW","AZE","BIH","BRB", - "BGD","BEL","BFA","BGR","BHR","BDI","BEN","BMU","BRN","BOL", - "BRA","BHS","BTN","BV","BWA","BLR","BLZ","CAN","CC","COD", - "CAF","COG","CHE","CIV","COK","CHL","CMR","CHN","COL","CRI", - "CUB","CPV","CX","CYP","CZE","DEU","DJI","DNK","DMA","DOM", - "DZA","ECU","EST","EGY","ESH","ERI","ESP","ETH","FIN","FJI", - "FLK","FSM","FRO","FRA","FX","GAB","GBR","GRD","GEO","GUF", - "GHA","GIB","GRL","GMB","GIN","GLP","GNQ","GRC","GS","GTM", - "GUM","GNB","GUY","HKG","HM","HND","HRV","HTI","HUN","IDN", - "IRL","ISR","IND","IO","IRQ","IRN","ISL","ITA","JAM","JOR", - "JPN","KEN","KGZ","KHM","KIR","COM","KNA","PRK","KOR","KWT", - "CYM","KAZ","LAO","LBN","LCA","LIE","LKA","LBR","LSO","LTU", - "LUX","LVA","LBY","MAR","MCO","MDA","MDG","MHL","MKD","MLI", - "MMR","MNG","MAC","MNP","MTQ","MRT","MSR","MLT","MUS","MDV", - "MWI","MEX","MYS","MOZ","NAM","NCL","NER","NFK","NGA","NIC", - "NLD","NOR","NPL","NRU","NIU","NZL","OMN","PAN","PER","PYF", - "PNG","PHL","PAK","POL","SPM","PCN","PRI","PSE","PRT","PLW", - "PRY","QAT","REU","ROU","RUS","RWA","SAU","SLB","SYC","SDN", - "SWE","SGP","SHN","SVN","SJM","SVK","SLE","SMR","SEN","SOM", - "SUR","STP","SLV","SYR","SWZ","TCA","TCD","TF","TGO","THA", - "TJK","TKL","TKM","TUN","TON","TLS","TUR","TTO","TUV","TWN", - "TZA","UKR","UGA","UM","USA","URY","UZB","VAT","VCT","VEN", - "VGB","VIR","VNM","VUT","WLF","WSM","YEM","YT","SRB","ZAF", - "ZMB","MNE","ZWE","A1","A2","O1","ALA","GGY","IMN","JEY"}; - -const char * GeoIP_country_name[251] = {"N/A","Asia/Pacific Region","Europe","Andorra","United Arab Emirates","Afghanistan","Antigua and Barbuda","Anguilla","Albania","Armenia","Netherlands Antilles", - "Angola","Antarctica","Argentina","American Samoa","Austria","Australia","Aruba","Azerbaijan","Bosnia and Herzegovina","Barbados", - "Bangladesh","Belgium","Burkina Faso","Bulgaria","Bahrain","Burundi","Benin","Bermuda","Brunei Darussalam","Bolivia", - "Brazil","Bahamas","Bhutan","Bouvet Island","Botswana","Belarus","Belize","Canada","Cocos (Keeling) Islands","Congo, The Democratic Republic of the", - "Central African Republic","Congo","Switzerland","Cote D'Ivoire","Cook Islands","Chile","Cameroon","China","Colombia","Costa Rica", - "Cuba","Cape Verde","Christmas Island","Cyprus","Czech Republic","Germany","Djibouti","Denmark","Dominica","Dominican Republic", - "Algeria","Ecuador","Estonia","Egypt","Western Sahara","Eritrea","Spain","Ethiopia","Finland","Fiji", - "Falkland Islands (Malvinas)","Micronesia, Federated States of","Faroe Islands","France","France, Metropolitan","Gabon","United Kingdom","Grenada","Georgia","French Guiana", - "Ghana","Gibraltar","Greenland","Gambia","Guinea","Guadeloupe","Equatorial Guinea","Greece","South Georgia and the South Sandwich Islands","Guatemala", - "Guam","Guinea-Bissau","Guyana","Hong Kong","Heard Island and McDonald Islands","Honduras","Croatia","Haiti","Hungary","Indonesia", - "Ireland","Israel","India","British Indian Ocean Territory","Iraq","Iran, Islamic Republic of","Iceland","Italy","Jamaica","Jordan", - "Japan","Kenya","Kyrgyzstan","Cambodia","Kiribati","Comoros","Saint Kitts and Nevis","Korea, Democratic People's Republic of","Korea, Republic of","Kuwait", - "Cayman Islands","Kazakhstan","Lao People's Democratic Republic","Lebanon","Saint Lucia","Liechtenstein","Sri Lanka","Liberia","Lesotho","Lithuania", - "Luxembourg","Latvia","Libyan Arab Jamahiriya","Morocco","Monaco","Moldova, Republic of","Madagascar","Marshall Islands","Macedonia","Mali", - "Myanmar","Mongolia","Macau","Northern Mariana Islands","Martinique","Mauritania","Montserrat","Malta","Mauritius","Maldives", - "Malawi","Mexico","Malaysia","Mozambique","Namibia","New Caledonia","Niger","Norfolk Island","Nigeria","Nicaragua", - "Netherlands","Norway","Nepal","Nauru","Niue","New Zealand","Oman","Panama","Peru","French Polynesia", - "Papua New Guinea","Philippines","Pakistan","Poland","Saint Pierre and Miquelon","Pitcairn Islands","Puerto Rico","Palestinian Territory","Portugal","Palau", - "Paraguay","Qatar","Reunion","Romania","Russian Federation","Rwanda","Saudi Arabia","Solomon Islands","Seychelles","Sudan", - "Sweden","Singapore","Saint Helena","Slovenia","Svalbard and Jan Mayen","Slovakia","Sierra Leone","San Marino","Senegal","Somalia","Suriname", - "Sao Tome and Principe","El Salvador","Syrian Arab Republic","Swaziland","Turks and Caicos Islands","Chad","French Southern Territories","Togo","Thailand", - "Tajikistan","Tokelau","Turkmenistan","Tunisia","Tonga","Timor-Leste","Turkey","Trinidad and Tobago","Tuvalu","Taiwan", - "Tanzania, United Republic of","Ukraine","Uganda","United States Minor Outlying Islands","United States","Uruguay","Uzbekistan","Holy See (Vatican City State)","Saint Vincent and the Grenadines","Venezuela", - "Virgin Islands, British","Virgin Islands, U.S.","Vietnam","Vanuatu","Wallis and Futuna","Samoa","Yemen","Mayotte","Serbia","South Africa", - "Zambia","Montenegro","Zimbabwe","Anonymous Proxy","Satellite Provider","Other","Aland Islands","Guernsey","Isle of Man","Jersey"}; - -/* Possible continent codes are AF, AS, EU, NA, OC, SA for Africa, Asia, Europe, North America, Oceania -and South America. */ - -const char GeoIP_country_continent[251][3] = {"--","AS","EU","EU","AS","AS","SA","SA","EU","AS","SA", - "AF","AN","SA","OC","EU","OC","SA","AS","EU","SA", - "AS","EU","AF","EU","AS","AF","AF","SA","AS","SA", - "SA","SA","AS","AF","AF","EU","SA","NA","AS","AF", - "AF","AF","EU","AF","OC","SA","AF","AS","SA","SA", - "SA","AF","AS","AS","EU","EU","AF","EU","SA","SA", - "AF","SA","EU","AF","AF","AF","EU","AF","EU","OC", - "SA","OC","EU","EU","EU","AF","EU","SA","AS","SA", - "AF","EU","SA","AF","AF","SA","AF","EU","SA","SA", - "OC","AF","SA","AS","AF","SA","EU","SA","EU","AS", - "EU","AS","AS","AS","AS","AS","EU","EU","SA","AS", - "AS","AF","AS","AS","OC","AF","SA","AS","AS","AS", - "SA","AS","AS","AS","SA","EU","AS","AF","AF","EU", - "EU","EU","AF","AF","EU","EU","AF","OC","EU","AF", - "AS","AS","AS","OC","SA","AF","SA","EU","AF","AS", - "AF","NA","AS","AF","AF","OC","AF","OC","AF","SA", - "EU","EU","AS","OC","OC","OC","AS","SA","SA","OC", - "OC","AS","AS","EU","SA","OC","SA","AS","EU","OC", - "SA","AS","AF","EU","AS","AF","AS","OC","AF","AF", - "EU","AS","AF","EU","EU","EU","AF","EU","AF","AF", - "SA","AF","SA","AS","AF","SA","AF","AF","AF","AS", - "AS","OC","AS","AF","OC","AS","AS","SA","OC","AS", - "AF","EU","AF","OC","NA","SA","AS","EU","SA","SA", - "SA","SA","AS","OC","OC","OC","AS","AF","EU","AF", - "AF","EU","AF","--","--","--","EU","EU","EU","EU"}; - -const char * GeoIPDBDescription[NUM_DB_TYPES] = {NULL, "GeoIP Country Edition", "GeoIP City Edition, Rev 1", "GeoIP Region Edition, Rev 1", "GeoIP ISP Edition", "GeoIP Organization Edition", "GeoIP City Edition, Rev 0", "GeoIP Region Edition, Rev 0","GeoIP Proxy Edition","GeoIP ASNum Edition","GeoIP Netspeed Edition","GeoIP Domain Name Edition"}; - -char * custom_directory = NULL; - -void GeoIP_setup_custom_directory (char * dir) { - custom_directory = dir; -} - -char *_GeoIP_full_path_to(const char *file_name) { - int len; - char *path = malloc(sizeof(char) * 1024); - - if (custom_directory == NULL){ -#ifndef WIN32 - memset(path, 0, sizeof(char) * 1024); - snprintf(path, sizeof(char) * 1024 - 1, "%s/%s", GEOIPDATADIR, file_name); -#else - char buf[MAX_PATH], *p, *q = NULL; - memset(buf, 0, sizeof(buf)); - len = GetModuleFileName(GetModuleHandle(NULL), buf, sizeof(buf) - 1); - for (p = buf + len; p > buf; p--) - if (*p == '\\') - { - if (!q) - q = p; - else - *p = '/'; - } - *q = 0; - memset(path, 0, sizeof(char) * 1024); - snprintf(path, sizeof(char) * 1024 - 1, "%s/%s", buf, file_name); -#endif - } else { - len = strlen(custom_directory); - if (custom_directory[len-1] != '/') { - snprintf(path, sizeof(char) * 1024 - 1, "%s/%s",custom_directory, file_name); - } else { - snprintf(path, sizeof(char) * 1024 - 1, "%s%s", custom_directory, file_name); - } - } - return path; -} - -char ** GeoIPDBFileName = NULL; - -void _GeoIP_setup_dbfilename() { - if (NULL == GeoIPDBFileName) { - GeoIPDBFileName = malloc(sizeof(char *) * NUM_DB_TYPES); - memset(GeoIPDBFileName, 0, sizeof(char *) * NUM_DB_TYPES); - - GeoIPDBFileName[GEOIP_COUNTRY_EDITION] = _GeoIP_full_path_to("GeoIP.dat"); - GeoIPDBFileName[GEOIP_REGION_EDITION_REV0] = _GeoIP_full_path_to("GeoIPRegion.dat"); - GeoIPDBFileName[GEOIP_REGION_EDITION_REV1] = _GeoIP_full_path_to("GeoIPRegion.dat"); - GeoIPDBFileName[GEOIP_CITY_EDITION_REV0] = _GeoIP_full_path_to("GeoIPCity.dat"); - GeoIPDBFileName[GEOIP_CITY_EDITION_REV1] = _GeoIP_full_path_to("GeoIPCity.dat"); - GeoIPDBFileName[GEOIP_ISP_EDITION] = _GeoIP_full_path_to("GeoIPISP.dat"); - GeoIPDBFileName[GEOIP_ORG_EDITION] = _GeoIP_full_path_to("GeoIPOrg.dat"); - GeoIPDBFileName[GEOIP_PROXY_EDITION] = _GeoIP_full_path_to("GeoIPProxy.dat"); - GeoIPDBFileName[GEOIP_ASNUM_EDITION] = _GeoIP_full_path_to("GeoIPASNum.dat"); - GeoIPDBFileName[GEOIP_NETSPEED_EDITION] = _GeoIP_full_path_to("GeoIPNetSpeed.dat"); - GeoIPDBFileName[GEOIP_DOMAIN_EDITION] = _GeoIP_full_path_to("GeoIPDomain.dat"); - } -} - -static -int _file_exists(const char *file_name) { - struct stat file_stat; - return( (stat(file_name, &file_stat) == 0) ? 1:0); -} - -int GeoIP_db_avail(int type) { - const char * filePath; - if (type < 0 || type >= NUM_DB_TYPES) { - return 0; - } - _GeoIP_setup_dbfilename(); - filePath = GeoIPDBFileName[type]; - if (NULL == filePath) { - return 0; - } - return _file_exists(filePath); -} - -static -void _setup_segments(GeoIP * gi) { - int i, j; - unsigned char delim[3]; - unsigned char buf[SEGMENT_RECORD_LENGTH]; - - gi->databaseSegments = NULL; - - /* default to GeoIP Country Edition */ - gi->databaseType = GEOIP_COUNTRY_EDITION; - gi->record_length = STANDARD_RECORD_LENGTH; - fseek(gi->GeoIPDatabase, -3l, SEEK_END); - for (i = 0; i < STRUCTURE_INFO_MAX_SIZE; i++) { - fread(delim, 1, 3, gi->GeoIPDatabase); - if (delim[0] == 255 && delim[1] == 255 && delim[2] == 255) { - fread(&gi->databaseType, 1, 1, gi->GeoIPDatabase); - if (gi->databaseType >= 106) { - /* backwards compatibility with databases from April 2003 and earlier */ - gi->databaseType -= 105; - } - - if (gi->databaseType == GEOIP_REGION_EDITION_REV0) { - /* Region Edition, pre June 2003 */ - gi->databaseSegments = malloc(sizeof(int)); - gi->databaseSegments[0] = STATE_BEGIN_REV0; - } else if (gi->databaseType == GEOIP_REGION_EDITION_REV1) { - /* Region Edition, post June 2003 */ - gi->databaseSegments = malloc(sizeof(int)); - gi->databaseSegments[0] = STATE_BEGIN_REV1; - } else if (gi->databaseType == GEOIP_CITY_EDITION_REV0 || - gi->databaseType == GEOIP_CITY_EDITION_REV1 || - gi->databaseType == GEOIP_ORG_EDITION || - gi->databaseType == GEOIP_ISP_EDITION || - gi->databaseType == GEOIP_ASNUM_EDITION) { - /* City/Org Editions have two segments, read offset of second segment */ - gi->databaseSegments = malloc(sizeof(int)); - gi->databaseSegments[0] = 0; - fread(buf, SEGMENT_RECORD_LENGTH, 1, gi->GeoIPDatabase); - for (j = 0; j < SEGMENT_RECORD_LENGTH; j++) { - gi->databaseSegments[0] += (buf[j] << (j * 8)); - } - if (gi->databaseType == GEOIP_ORG_EDITION || - gi->databaseType == GEOIP_ISP_EDITION) - gi->record_length = ORG_RECORD_LENGTH; - } - break; - } else { - fseek(gi->GeoIPDatabase, -4l, SEEK_CUR); - } - } - if (gi->databaseType == GEOIP_COUNTRY_EDITION || - gi->databaseType == GEOIP_PROXY_EDITION || - gi->databaseType == GEOIP_NETSPEED_EDITION) { - gi->databaseSegments = malloc(sizeof(int)); - gi->databaseSegments[0] = COUNTRY_BEGIN; - } -} - -static -int _check_mtime(GeoIP *gi) { - struct stat buf; - if (gi->flags & GEOIP_CHECK_CACHE) { - if (stat(gi->file_path, &buf) != -1) { - if (buf.st_mtime != gi->mtime) { - /* GeoIP Database file updated */ - if (gi->flags & GEOIP_MEMORY_CACHE) { - /* reload database into memory cache */ - if ((gi->cache = (unsigned char*) realloc(gi->cache, buf.st_size)) == NULL) { - fprintf(stderr,"Out of memory when reloading %s\n",gi->file_path); - return -1; - } - } - /* refresh filehandle */ - fclose(gi->GeoIPDatabase); - gi->GeoIPDatabase = fopen(gi->file_path,"rb"); - if (gi->GeoIPDatabase == NULL) { - fprintf(stderr,"Error Opening file %s when reloading\n",gi->file_path); - return -1; - } - gi->mtime = buf.st_mtime; - if (gi->flags & GEOIP_MEMORY_CACHE) { - if (fread(gi->cache, sizeof(unsigned char), buf.st_size, gi->GeoIPDatabase) != (size_t) buf.st_size) { - fprintf(stderr,"Error reading file %s when reloading\n",gi->file_path); - return -1; - } - } - if (gi->databaseSegments != NULL) { - free(gi->databaseSegments); - gi->databaseSegments = NULL; - } - _setup_segments(gi); - if (gi->databaseSegments == NULL) { - fprintf(stderr, "Error reading file %s -- corrupt\n", gi->file_path); - return -1; - } - if (gi->flags & GEOIP_INDEX_CACHE) { - gi->index_cache = (unsigned char *) realloc(gi->index_cache, sizeof(unsigned char) * ((gi->databaseSegments[0] * (long)gi->record_length * 2))); - if (gi->index_cache != NULL) { - fseek(gi->GeoIPDatabase, 0, SEEK_SET); - if (fread(gi->index_cache, sizeof(unsigned char), gi->databaseSegments[0] * (long)gi->record_length * 2, gi->GeoIPDatabase) != (size_t) (gi->databaseSegments[0]*(long)gi->record_length * 2)) { - fprintf(stderr,"Error reading file %s where reloading\n",gi->file_path); - return -1; - } - } - } - } - } - } - return 0; -} - -unsigned int _GeoIP_seek_record (GeoIP *gi, unsigned long ipnum) { - int depth; - unsigned int x; - unsigned char stack_buffer[2 * MAX_RECORD_LENGTH]; - const unsigned char *buf = (gi->cache == NULL) ? stack_buffer : NULL; - unsigned int offset = 0; - - const unsigned char * p; - int j; - - _check_mtime(gi); - for (depth = 31; depth >= 0; depth--) { - if (gi->cache == NULL && gi->index_cache == NULL) { - /* read from disk */ - fseek(gi->GeoIPDatabase, (long)gi->record_length * 2 * offset, SEEK_SET); - fread(stack_buffer,gi->record_length,2,gi->GeoIPDatabase); - } else if (gi->index_cache == NULL) { - /* simply point to record in memory */ - buf = gi->cache + (long)gi->record_length * 2 *offset; - } else { - buf = gi->index_cache + (long)gi->record_length * 2 * offset; - } - - if (ipnum & (1 << depth)) { - /* Take the right-hand branch */ - if ( gi->record_length == 3 ) { - /* Most common case is completely unrolled and uses constants. */ - x = (buf[3*1 + 0] << (0*8)) - + (buf[3*1 + 1] << (1*8)) - + (buf[3*1 + 2] << (2*8)); - - } else { - /* General case */ - j = gi->record_length; - p = &buf[2*j]; - x = 0; - do { - x <<= 8; - x += *(--p); - } while ( --j ); - } - - } else { - /* Take the left-hand branch */ - if ( gi->record_length == 3 ) { - /* Most common case is completely unrolled and uses constants. */ - x = (buf[3*0 + 0] << (0*8)) - + (buf[3*0 + 1] << (1*8)) - + (buf[3*0 + 2] << (2*8)); - } else { - /* General case */ - j = gi->record_length; - p = &buf[1*j]; - x = 0; - do { - x <<= 8; - x += *(--p); - } while ( --j ); - } - } - - if (x >= gi->databaseSegments[0]) { - gi->netmask = 32 - depth; - return x; - } - offset = x; - } - - /* shouldn't reach here */ - fprintf(stderr,"Error Traversing Database for ipnum = %lu - Perhaps database is corrupt?\n",ipnum); - return 0; -} - -unsigned long _GeoIP_addr_to_num (const char *addr) { - int i; - char tok[4]; - int octet; - int j = 0, k = 0; - unsigned long ipnum = 0; - char c = 0; - - for (i=0; i<4; i++) { - for (;;) { - c = addr[k++]; - if (c == '.' || c == '\0') { - tok[j] = '\0'; - octet = atoi(tok); - if (octet > 255) - return 0; - ipnum += (octet << ((3-i)*8)); - j = 0; - break; - } else if (c >= '0' && c<= '9') { - if (j > 2) { - return 0; - } - tok[j++] = c; - } else { - return 0; - } - } - if(c == '\0' && i<3) { - return 0; - } - } - return ipnum; -} - -GeoIP* GeoIP_open_type (int type, int flags) { - GeoIP * gi; - const char * filePath; - if (type < 0 || type >= NUM_DB_TYPES) { - printf("Invalid database type %d\n", type); - return NULL; - } - _GeoIP_setup_dbfilename(); - filePath = GeoIPDBFileName[type]; - if (filePath == NULL) { - printf("Invalid database type %d\n", type); - return NULL; - } - gi = GeoIP_open (filePath, flags); - return gi; -} - -GeoIP* GeoIP_new (int flags) { - GeoIP * gi; - _GeoIP_setup_dbfilename(); - gi = GeoIP_open (GeoIPDBFileName[GEOIP_COUNTRY_EDITION], flags); - return gi; -} - -GeoIP* GeoIP_open (const char * filename, int flags) { - struct stat buf; - GeoIP * gi; - size_t len; - -#ifdef WIN32 - WSADATA wsa; - if (WSAStartup(MAKEWORD(1, 1), &wsa) != 0) - return NULL; -#endif - - gi = (GeoIP *)malloc(sizeof(GeoIP)); - if (gi == NULL) - return NULL; - len = sizeof(char) * (strlen(filename)+1); - gi->file_path = malloc(len); - if (gi->file_path == NULL) { - free(gi); - return NULL; - } - strncpy(gi->file_path, filename, len); - gi->GeoIPDatabase = fopen(filename,"rb"); - if (gi->GeoIPDatabase == NULL) { - fprintf(stderr,"Error Opening file %s\n",filename); - free(gi->file_path); - free(gi); - return NULL; - } else { - if (flags & GEOIP_MEMORY_CACHE) { - if (fstat(fileno(gi->GeoIPDatabase), &buf) == -1) { - fprintf(stderr,"Error stating file %s\n",filename); - free(gi->file_path); - free(gi); - return NULL; - } - gi->mtime = buf.st_mtime; - gi->cache = (unsigned char *) malloc(sizeof(unsigned char) * buf.st_size); - if (gi->cache != NULL) { - if (fread(gi->cache, sizeof(unsigned char), buf.st_size, gi->GeoIPDatabase) != (size_t) buf.st_size) { - fprintf(stderr,"Error reading file %s\n",filename); - free(gi->cache); - free(gi->file_path); - free(gi); - return NULL; - } - } - } else { - if (flags & GEOIP_CHECK_CACHE) { - if (fstat(fileno(gi->GeoIPDatabase), &buf) == -1) { - fprintf(stderr,"Error stating file %s\n",filename); - free(gi->file_path); - free(gi); - return NULL; - } - gi->mtime = buf.st_mtime; - } - gi->cache = NULL; - } - gi->flags = flags; - gi->charset = GEOIP_CHARSET_ISO_8859_1; - - _setup_segments(gi); - if (flags & GEOIP_INDEX_CACHE) { - gi->index_cache = (unsigned char *) malloc(sizeof(unsigned char) * ((gi->databaseSegments[0] * (long)gi->record_length * 2))); - if (gi->index_cache != NULL) { - fseek(gi->GeoIPDatabase, 0, SEEK_SET); - if (fread(gi->index_cache, sizeof(unsigned char), gi->databaseSegments[0] * (long)gi->record_length * 2, gi->GeoIPDatabase) != (size_t) (gi->databaseSegments[0]*(long)gi->record_length * 2)) { - fprintf(stderr,"Error reading file %s\n",filename); - free(gi->databaseSegments); - free(gi->index_cache); - free(gi); - return NULL; - } - } - } else { - gi->index_cache = NULL; - } - return gi; - } -} - -void GeoIP_delete (GeoIP *gi) { - if (gi == NULL ) - return; - if (gi->GeoIPDatabase != NULL) - fclose(gi->GeoIPDatabase); - if (gi->cache != NULL) - free(gi->cache); - if (gi->index_cache != NULL) - free(gi->index_cache); - if (gi->file_path != NULL) - free(gi->file_path); - if (gi->databaseSegments != NULL) - free(gi->databaseSegments); - free(gi); -} - -const char *GeoIP_country_code_by_name (GeoIP* gi, const char *name) { - int country_id; - country_id = GeoIP_id_by_name(gi, name); - return (country_id > 0) ? GeoIP_country_code[country_id] : NULL; -} - -const char *GeoIP_country_code3_by_name (GeoIP* gi, const char *name) { - int country_id; - country_id = GeoIP_id_by_name(gi, name); - return (country_id > 0) ? GeoIP_country_code3[country_id] : NULL; -} - -const char *GeoIP_country_name_by_name (GeoIP* gi, const char *name) { - int country_id; - country_id = GeoIP_id_by_name(gi, name); - return (country_id > 0) ? GeoIP_country_name[country_id] : NULL; -} - -unsigned long _GeoIP_lookupaddress (const char *host) { - unsigned long addr = inet_addr(host); - struct hostent phe2; - struct hostent * phe = &phe2; - char *buf = NULL; - int result = 0; -#ifdef HAVE_GETHOSTBYNAME_R - buf = malloc(buflength); -#endif - if (addr == INADDR_NONE) { -#ifdef HAVE_GETHOSTBYNAME_R - while (1) { - /* we use gethostbyname_r here because it is thread-safe and gethostbyname is not */ -#ifdef GETHOSTBYNAME_R_RETURNS_INT - result = gethostbyname_r(host,&phe2,buf,buflength,&phe,&herr); -#else - phe = gethostbyname_r(host,&phe2,buf,buflength,&herr); -#endif - if (herr != ERANGE) - break; - if (result == 0) - break; - /* double the buffer if the buffer is too small */ - buflength = buflength * 2; - buf = realloc(buf,buflength); - } -#endif -#ifndef HAVE_GETHOSTBYNAME_R - /* Some systems do not support gethostbyname_r, such as Mac OS X */ - phe = gethostbyname(host); -#endif - if (!phe || result != 0) { - free(buf); - return 0; - } - addr = *((unsigned long *) phe->h_addr_list[0]); - } -#ifdef HAVE_GETHOSTBYNAME_R - free(buf); -#endif - return ntohl(addr); -} - -int GeoIP_id_by_name (GeoIP* gi, const char *name) { - unsigned long ipnum; - int ret; - if (name == NULL) { - return 0; - } - if (gi->databaseType != GEOIP_COUNTRY_EDITION && gi->databaseType != GEOIP_PROXY_EDITION && gi->databaseType != GEOIP_NETSPEED_EDITION) { - printf("Invalid database type %s, expected %s\n", GeoIPDBDescription[(int)gi->databaseType], GeoIPDBDescription[GEOIP_COUNTRY_EDITION]); - return 0; - } - if (!(ipnum = _GeoIP_lookupaddress(name))) - return 0; - ret = _GeoIP_seek_record(gi, ipnum) - COUNTRY_BEGIN; - return ret; - -} - -const char *GeoIP_country_code_by_addr (GeoIP* gi, const char *addr) { - int country_id; - country_id = GeoIP_id_by_addr(gi, addr); - return (country_id > 0) ? GeoIP_country_code[country_id] : NULL; -} - -const char *GeoIP_country_code3_by_addr (GeoIP* gi, const char *addr) { - int country_id; - country_id = GeoIP_id_by_addr(gi, addr); - return (country_id > 0) ? GeoIP_country_code3[country_id] : NULL; - return GeoIP_country_code3[country_id]; -} - -const char *GeoIP_country_name_by_addr (GeoIP* gi, const char *addr) { - int country_id; - country_id = GeoIP_id_by_addr(gi, addr); - return (country_id > 0) ? GeoIP_country_name[country_id] : NULL; - return GeoIP_country_name[country_id]; -} - -const char *GeoIP_country_name_by_ipnum (GeoIP* gi, unsigned long ipnum) { - int country_id; - country_id = GeoIP_id_by_ipnum(gi, ipnum); - return (country_id > 0) ? GeoIP_country_name[country_id] : NULL; -} - -const char *GeoIP_country_code_by_ipnum (GeoIP* gi, unsigned long ipnum) { - int country_id; - country_id = GeoIP_id_by_ipnum(gi, ipnum); - return (country_id > 0) ? GeoIP_country_code[country_id] : NULL; -} - -const char *GeoIP_country_code3_by_ipnum (GeoIP* gi, unsigned long ipnum) { - int country_id; - country_id = GeoIP_id_by_ipnum(gi, ipnum); - return (country_id > 0) ? GeoIP_country_code3[country_id] : NULL; -} - -int GeoIP_country_id_by_addr (GeoIP* gi, const char *addr) { - return GeoIP_id_by_addr(gi, addr); -} - -int GeoIP_country_id_by_name (GeoIP* gi, const char *host) { - return GeoIP_id_by_name(gi, host); -} - -int GeoIP_id_by_addr (GeoIP* gi, const char *addr) { - unsigned long ipnum; - int ret; - if (addr == NULL) { - return 0; - } - if (gi->databaseType != GEOIP_COUNTRY_EDITION && - gi->databaseType != GEOIP_PROXY_EDITION && - gi->databaseType != GEOIP_NETSPEED_EDITION) { - printf("Invalid database type %s, expected %s\n", - GeoIPDBDescription[(int)gi->databaseType], - GeoIPDBDescription[GEOIP_COUNTRY_EDITION]); - return 0; - } - ipnum = _GeoIP_addr_to_num(addr); - ret = _GeoIP_seek_record(gi, ipnum) - COUNTRY_BEGIN; - return ret; -} - -int GeoIP_id_by_ipnum (GeoIP* gi, unsigned long ipnum) { - int ret; - if (ipnum == 0) { - return 0; - } - if (gi->databaseType != GEOIP_COUNTRY_EDITION && - gi->databaseType != GEOIP_PROXY_EDITION && - gi->databaseType != GEOIP_NETSPEED_EDITION) { - printf("Invalid database type %s, expected %s\n", - GeoIPDBDescription[(int)gi->databaseType], - GeoIPDBDescription[GEOIP_COUNTRY_EDITION]); - return 0; - } - ret = _GeoIP_seek_record(gi, ipnum) - COUNTRY_BEGIN; - return ret; -} - -char *GeoIP_database_info (GeoIP* gi) { - int i; - unsigned char buf[3]; - char *retval; - int hasStructureInfo = 0; - - if(gi == NULL) - return NULL; - - _check_mtime(gi); - fseek(gi->GeoIPDatabase, -3l, SEEK_END); - - /* first get past the database structure information */ - for (i = 0; i < STRUCTURE_INFO_MAX_SIZE; i++) { - fread(buf, 1, 3, gi->GeoIPDatabase); - if (buf[0] == 255 && buf[1] == 255 && buf[2] == 255) { - hasStructureInfo = 1; - break; - } - fseek(gi->GeoIPDatabase, -4l, SEEK_CUR); - } - if (hasStructureInfo == 1) { - fseek(gi->GeoIPDatabase, -6l, SEEK_CUR); - } else { - /* no structure info, must be pre Sep 2002 database, go back to end */ - fseek(gi->GeoIPDatabase, -3l, SEEK_END); - } - - for (i = 0; i < DATABASE_INFO_MAX_SIZE; i++) { - fread(buf, 1, 3, gi->GeoIPDatabase); - if (buf[0] == 0 && buf[1] == 0 && buf[2] == 0) { - retval = malloc(sizeof(char) * (i+1)); - if (retval == NULL) { - return NULL; - } - fread(retval, 1, i, gi->GeoIPDatabase); - retval[i] = '\0'; - return retval; - } - fseek(gi->GeoIPDatabase, -4l, SEEK_CUR); - } - return NULL; -} - -/* GeoIP Region Edition functions */ - -void GeoIP_assign_region_by_inetaddr(GeoIP* gi, unsigned long inetaddr, GeoIPRegion *region) { - unsigned int seek_region; - - /* This also writes in the terminating NULs (if you decide to - * keep them) and clear any fields that are not set. */ - memset(region, 0, sizeof(GeoIPRegion)); - - seek_region = _GeoIP_seek_record(gi, ntohl(inetaddr)); - - if (gi->databaseType == GEOIP_REGION_EDITION_REV0) { - /* Region Edition, pre June 2003 */ - seek_region -= STATE_BEGIN_REV0; - if (seek_region >= 1000) { - region->country_code[0] = 'U'; - region->country_code[1] = 'S'; - region->region[0] = (char) ((seek_region - 1000)/26 + 65); - region->region[1] = (char) ((seek_region - 1000)%26 + 65); - } else { - memcpy(region->country_code, GeoIP_country_code[seek_region], 2); - } - } else if (gi->databaseType == GEOIP_REGION_EDITION_REV1) { - /* Region Edition, post June 2003 */ - seek_region -= STATE_BEGIN_REV1; - if (seek_region < US_OFFSET) { - /* Unknown */ - /* we don't need to do anything here b/c we memset region to 0 */ - } else if (seek_region < CANADA_OFFSET) { - /* USA State */ - region->country_code[0] = 'U'; - region->country_code[1] = 'S'; - region->region[0] = (char) ((seek_region - US_OFFSET)/26 + 65); - region->region[1] = (char) ((seek_region - US_OFFSET)%26 + 65); - } else if (seek_region < WORLD_OFFSET) { - /* Canada Province */ - region->country_code[0] = 'C'; - region->country_code[1] = 'A'; - region->region[0] = (char) ((seek_region - CANADA_OFFSET)/26 + 65); - region->region[1] = (char) ((seek_region - CANADA_OFFSET)%26 + 65); - } else { - /* Not US or Canada */ - memcpy(region->country_code, GeoIP_country_code[(seek_region - WORLD_OFFSET) / FIPS_RANGE], 2); - } - } -} - -static -GeoIPRegion * _get_region(GeoIP* gi, unsigned long ipnum) { - GeoIPRegion * region; - - region = malloc(sizeof(GeoIPRegion)); - if (region) { - GeoIP_assign_region_by_inetaddr(gi, htonl(ipnum), region); - } - return region; -} - -GeoIPRegion * GeoIP_region_by_addr (GeoIP* gi, const char *addr) { - unsigned long ipnum; - if (addr == NULL) { - return 0; - } - if (gi->databaseType != GEOIP_REGION_EDITION_REV0 && - gi->databaseType != GEOIP_REGION_EDITION_REV1) { - printf("Invalid database type %s, expected %s\n", GeoIPDBDescription[(int)gi->databaseType], GeoIPDBDescription[GEOIP_REGION_EDITION_REV1]); - return 0; - } - ipnum = _GeoIP_addr_to_num(addr); - return _get_region(gi, ipnum); -} - -GeoIPRegion * GeoIP_region_by_name (GeoIP* gi, const char *name) { - unsigned long ipnum; - if (name == NULL) { - return 0; - } - if (gi->databaseType != GEOIP_REGION_EDITION_REV0 && - gi->databaseType != GEOIP_REGION_EDITION_REV1) { - printf("Invalid database type %s, expected %s\n", GeoIPDBDescription[(int)gi->databaseType], GeoIPDBDescription[GEOIP_REGION_EDITION_REV1]); - return 0; - } - if (!(ipnum = _GeoIP_lookupaddress(name))) - return 0; - return _get_region(gi, ipnum); -} - -GeoIPRegion * GeoIP_region_by_ipnum (GeoIP* gi, unsigned long ipnum) { - if (gi->databaseType != GEOIP_REGION_EDITION_REV0 && - gi->databaseType != GEOIP_REGION_EDITION_REV1) { - printf("Invalid database type %s, expected %s\n", GeoIPDBDescription[(int)gi->databaseType], GeoIPDBDescription[GEOIP_REGION_EDITION_REV1]); - return 0; - } - return _get_region(gi, ipnum); -} - -void GeoIPRegion_delete (GeoIPRegion *gir) { - free(gir); -} - -/* GeoIP Organization, ISP and AS Number Edition private method */ -static -char *_get_name (GeoIP* gi, unsigned long ipnum) { - int seek_org; - char buf[MAX_ORG_RECORD_LENGTH]; - char * org_buf, * buf_pointer; - int record_pointer; - size_t len; - - if (gi->databaseType != GEOIP_ORG_EDITION && - gi->databaseType != GEOIP_ISP_EDITION && - gi->databaseType != GEOIP_ASNUM_EDITION) { - printf("Invalid database type %s, expected %s\n", GeoIPDBDescription[(int)gi->databaseType], GeoIPDBDescription[GEOIP_ORG_EDITION]); - return 0; - } - - seek_org = _GeoIP_seek_record(gi, ipnum); - if (seek_org == gi->databaseSegments[0]) - return NULL; - - record_pointer = seek_org + (2 * gi->record_length - 1) * gi->databaseSegments[0]; - - if (gi->cache == NULL) { - fseek(gi->GeoIPDatabase, record_pointer, SEEK_SET); - fread(buf, sizeof(char), MAX_ORG_RECORD_LENGTH, gi->GeoIPDatabase); - len = sizeof(char) * (strlen(buf)+1); - org_buf = malloc(len); - strncpy(org_buf, buf, len); - } else { - buf_pointer = (char *)gi->cache + (long)record_pointer; - len = sizeof(char) * (strlen(buf_pointer)+1); - org_buf = malloc(len); - strncpy(org_buf, buf_pointer, len); - } - return org_buf; -} - -char *GeoIP_name_by_ipnum (GeoIP* gi, unsigned long ipnum) { - return _get_name(gi,ipnum); -} - -char *GeoIP_name_by_addr (GeoIP* gi, const char *addr) { - unsigned long ipnum; - if (addr == NULL) { - return 0; - } - ipnum = _GeoIP_addr_to_num(addr); - return _get_name(gi, ipnum); -} - -char *GeoIP_name_by_name (GeoIP* gi, const char *name) { - unsigned long ipnum; - if (name == NULL) { - return 0; - } - if (!(ipnum = _GeoIP_lookupaddress(name))) - return 0; - return _get_name(gi, ipnum); -} - -char *GeoIP_org_by_ipnum (GeoIP* gi, unsigned long ipnum) { - return GeoIP_name_by_ipnum(gi, ipnum); -} - -char *GeoIP_org_by_addr (GeoIP* gi, const char *addr) { - return GeoIP_name_by_addr(gi, addr); -} - -char *GeoIP_org_by_name (GeoIP* gi, const char *name) { - return GeoIP_name_by_name(gi, name); -} - -unsigned char GeoIP_database_edition (GeoIP* gi) { - return gi->databaseType; -} - -int GeoIP_charset( GeoIP* gi){ - return gi->charset; -} - -int GeoIP_set_charset( GeoIP* gi, int charset ){ - int old_charset = gi->charset; - gi->charset = charset; - return old_charset; -} - -int GeoIP_last_netmask (GeoIP* gi) { - return gi->netmask; -} - diff --git a/dlls/geoip/GeoIP.dat b/dlls/geoip/GeoIP.dat deleted file mode 100755 index 13a65181..00000000 Binary files a/dlls/geoip/GeoIP.dat and /dev/null differ diff --git a/dlls/geoip/GeoIP.h b/dlls/geoip/GeoIP.h deleted file mode 100755 index 501cf470..00000000 --- a/dlls/geoip/GeoIP.h +++ /dev/null @@ -1,193 +0,0 @@ -/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 2 -*- */ -/* GeoIP.h - * - * Copyright (C) 2006 MaxMind LLC - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef GEOIP_H -#define GEOIP_H - -#ifdef __cplusplus -extern "C" { -#endif - -#if defined _MSC_VER && _MSC_VER >= 1400 - /* Disable deprecation warnings concerning unsafe CRT functions */ - #define _CRT_SECURE_NO_DEPRECATE - - /* Replace the POSIX function with ISO C++ conformant one as it is now deprecated */ - #define fileno _fileno - - /* Disable deprecation warnings because MSVC8 seemingly thinks ISO C++ conformant functions are deprecated. */ - #pragma warning (disable : 4996) -#endif - -#include -#include -#include -#include /* for fstat */ -#include /* for fstat */ - -#define SEGMENT_RECORD_LENGTH 3 -#define STANDARD_RECORD_LENGTH 3 -#define ORG_RECORD_LENGTH 4 -#define MAX_RECORD_LENGTH 4 -#define NUM_DB_TYPES 20 - -typedef struct GeoIPTag { - FILE *GeoIPDatabase; - char *file_path; - unsigned char *cache; - unsigned char *index_cache; - unsigned int *databaseSegments; - char databaseType; - time_t mtime; - int flags; - char record_length; - int charset; /* 0 iso-8859-1 1 utf8 */ - int record_iter; /* used in GeoIP_next_record */ - int netmask; /* netmask of last lookup - set using depth in _GeoIP_seek_record */ -} GeoIP; - - -typedef enum { - GEOIP_CHARSET_ISO_8859_1 = 0, - GEOIP_CHARSET_UTF8 = 1 -} GeoIPCharset; - -typedef struct GeoIPRegionTag { - char country_code[3]; - char region[3]; -} GeoIPRegion; - -typedef enum { - GEOIP_STANDARD = 0, - GEOIP_MEMORY_CACHE = 1, - GEOIP_CHECK_CACHE = 2, - GEOIP_INDEX_CACHE = 4, -} GeoIPOptions; - -typedef enum { - GEOIP_COUNTRY_EDITION = 1, - GEOIP_REGION_EDITION_REV0 = 7, - GEOIP_CITY_EDITION_REV0 = 6, - GEOIP_ORG_EDITION = 5, - GEOIP_ISP_EDITION = 4, - GEOIP_CITY_EDITION_REV1 = 2, - GEOIP_REGION_EDITION_REV1 = 3, - GEOIP_PROXY_EDITION = 8, - GEOIP_ASNUM_EDITION = 9, - GEOIP_NETSPEED_EDITION = 10, - GEOIP_DOMAIN_EDITION = 11 -} GeoIPDBTypes; - -typedef enum { - GEOIP_ANON_PROXY = 1, - GEOIP_HTTP_X_FORWARDED_FOR_PROXY = 2, - GEOIP_HTTP_CLIENT_IP_PROXY = 3, -} GeoIPProxyTypes; - -typedef enum { - GEOIP_UNKNOWN_SPEED = 0, - GEOIP_DIALUP_SPEED = 1, - GEOIP_CABLEDSL_SPEED = 2, - GEOIP_CORPORATE_SPEED = 3, -} GeoIPNetspeedValues; - -extern char **GeoIPDBFileName; -extern const char * GeoIPDBDescription[NUM_DB_TYPES]; -extern const char *GeoIPCountryDBFileName; -extern const char *GeoIPRegionDBFileName; -extern const char *GeoIPCityDBFileName; -extern const char *GeoIPOrgDBFileName; -extern const char *GeoIPISPDBFileName; - -extern const char GeoIP_country_code[251][3]; -extern const char GeoIP_country_code3[251][4]; -extern const char * GeoIP_country_name[251]; -extern const char GeoIP_country_continent[251][3]; - -#ifdef DLL -#define GEOIP_API __declspec(dllexport) -#else -#define GEOIP_API -#endif /* DLL */ - -GEOIP_API void GeoIP_setup_custom_directory(char *dir); -GEOIP_API GeoIP* GeoIP_open_type (int type, int flags); -GEOIP_API GeoIP* GeoIP_new(int flags); -GEOIP_API GeoIP* GeoIP_open(const char * filename, int flags); -GEOIP_API int GeoIP_db_avail(int type); -GEOIP_API void GeoIP_delete(GeoIP* gi); -GEOIP_API const char *GeoIP_country_code_by_addr (GeoIP* gi, const char *addr); -GEOIP_API const char *GeoIP_country_code_by_name (GeoIP* gi, const char *host); -GEOIP_API const char *GeoIP_country_code3_by_addr (GeoIP* gi, const char *addr); -GEOIP_API const char *GeoIP_country_code3_by_name (GeoIP* gi, const char *host); -GEOIP_API const char *GeoIP_country_name_by_addr (GeoIP* gi, const char *addr); -GEOIP_API const char *GeoIP_country_name_by_name (GeoIP* gi, const char *host); -GEOIP_API const char *GeoIP_country_name_by_ipnum (GeoIP* gi, unsigned long ipnum); -GEOIP_API const char *GeoIP_country_code_by_ipnum (GeoIP* gi, unsigned long ipnum); -GEOIP_API const char *GeoIP_country_code3_by_ipnum (GeoIP* gi, unsigned long ipnum); - -/* Deprecated - for backwards compatibility only */ -GEOIP_API int GeoIP_country_id_by_addr (GeoIP* gi, const char *addr); -GEOIP_API int GeoIP_country_id_by_name (GeoIP* gi, const char *host); -GEOIP_API char *GeoIP_org_by_addr (GeoIP* gi, const char *addr); -GEOIP_API char *GeoIP_org_by_name (GeoIP* gi, const char *host); -/* End deprecated */ - -GEOIP_API int GeoIP_id_by_addr (GeoIP* gi, const char *addr); -GEOIP_API int GeoIP_id_by_name (GeoIP* gi, const char *host); -GEOIP_API int GeoIP_id_by_ipnum (GeoIP* gi, unsigned long ipnum); - -GEOIP_API GeoIPRegion * GeoIP_region_by_addr (GeoIP* gi, const char *addr); -GEOIP_API GeoIPRegion * GeoIP_region_by_name (GeoIP* gi, const char *host); -GEOIP_API GeoIPRegion * GeoIP_region_by_ipnum (GeoIP *gi, unsigned long ipnum); - -/* Warning - don't call this after GeoIP_assign_region_by_inetaddr calls */ -GEOIP_API void GeoIPRegion_delete (GeoIPRegion *gir); - -GEOIP_API void GeoIP_assign_region_by_inetaddr(GeoIP* gi, unsigned long inetaddr, GeoIPRegion *gir); - -/* Used to query GeoIP Organization, ISP and AS Number databases */ -GEOIP_API char *GeoIP_name_by_ipnum (GeoIP* gi, unsigned long ipnum); -GEOIP_API char *GeoIP_name_by_addr (GeoIP* gi, const char *addr); -GEOIP_API char *GeoIP_name_by_name (GeoIP* gi, const char *host); - -GEOIP_API char *GeoIP_database_info (GeoIP* gi); -GEOIP_API unsigned char GeoIP_database_edition (GeoIP* gi); - -GEOIP_API int GeoIP_charset (GeoIP* gi); -GEOIP_API int GeoIP_set_charset (GeoIP* gi, int charset); - -GEOIP_API int GeoIP_last_netmask (GeoIP* gi); - -/* Convert region code to region name */ -GEOIP_API const char * GeoIP_region_name_by_code(const char *country_code, const char *region_code); - -/* Get timezone from country and region code */ -GEOIP_API const char * GeoIP_time_zone_by_country_and_region(const char *country_code, const char *region_code); - -#ifdef BSD -#define memcpy(dest, src, n) bcopy(src, dest, n) -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* GEOIP_H */ diff --git a/dlls/geoip/GeoIP2/inttypes.h b/dlls/geoip/GeoIP2/inttypes.h new file mode 100644 index 00000000..0e8af69c --- /dev/null +++ b/dlls/geoip/GeoIP2/inttypes.h @@ -0,0 +1,305 @@ +// ISO C9x compliant inttypes.h for Microsoft Visual Studio +// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 +// +// Copyright (c) 2006 Alexander Chemeris +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// 1. Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. The name of the author may be used to endorse or promote products +// derived from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _MSC_VER // [ +#error "Use this header only with Microsoft Visual C++ compilers!" +#endif // _MSC_VER ] + +#ifndef _MSC_INTTYPES_H_ // [ +#define _MSC_INTTYPES_H_ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#include + +// 7.8 Format conversion of integer types + +typedef struct { + intmax_t quot; + intmax_t rem; +} imaxdiv_t; + +// 7.8.1 Macros for format specifiers + +#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) // [ See footnote 185 at page 198 + +// The fprintf macros for signed integers are: +#define PRId8 "d" +#define PRIi8 "i" +#define PRIdLEAST8 "d" +#define PRIiLEAST8 "i" +#define PRIdFAST8 "d" +#define PRIiFAST8 "i" + +#define PRId16 "hd" +#define PRIi16 "hi" +#define PRIdLEAST16 "hd" +#define PRIiLEAST16 "hi" +#define PRIdFAST16 "hd" +#define PRIiFAST16 "hi" + +#define PRId32 "I32d" +#define PRIi32 "I32i" +#define PRIdLEAST32 "I32d" +#define PRIiLEAST32 "I32i" +#define PRIdFAST32 "I32d" +#define PRIiFAST32 "I32i" + +#define PRId64 "I64d" +#define PRIi64 "I64i" +#define PRIdLEAST64 "I64d" +#define PRIiLEAST64 "I64i" +#define PRIdFAST64 "I64d" +#define PRIiFAST64 "I64i" + +#define PRIdMAX "I64d" +#define PRIiMAX "I64i" + +#define PRIdPTR "Id" +#define PRIiPTR "Ii" + +// The fprintf macros for unsigned integers are: +#define PRIo8 "o" +#define PRIu8 "u" +#define PRIx8 "x" +#define PRIX8 "X" +#define PRIoLEAST8 "o" +#define PRIuLEAST8 "u" +#define PRIxLEAST8 "x" +#define PRIXLEAST8 "X" +#define PRIoFAST8 "o" +#define PRIuFAST8 "u" +#define PRIxFAST8 "x" +#define PRIXFAST8 "X" + +#define PRIo16 "ho" +#define PRIu16 "hu" +#define PRIx16 "hx" +#define PRIX16 "hX" +#define PRIoLEAST16 "ho" +#define PRIuLEAST16 "hu" +#define PRIxLEAST16 "hx" +#define PRIXLEAST16 "hX" +#define PRIoFAST16 "ho" +#define PRIuFAST16 "hu" +#define PRIxFAST16 "hx" +#define PRIXFAST16 "hX" + +#define PRIo32 "I32o" +#define PRIu32 "I32u" +#define PRIx32 "I32x" +#define PRIX32 "I32X" +#define PRIoLEAST32 "I32o" +#define PRIuLEAST32 "I32u" +#define PRIxLEAST32 "I32x" +#define PRIXLEAST32 "I32X" +#define PRIoFAST32 "I32o" +#define PRIuFAST32 "I32u" +#define PRIxFAST32 "I32x" +#define PRIXFAST32 "I32X" + +#define PRIo64 "I64o" +#define PRIu64 "I64u" +#define PRIx64 "I64x" +#define PRIX64 "I64X" +#define PRIoLEAST64 "I64o" +#define PRIuLEAST64 "I64u" +#define PRIxLEAST64 "I64x" +#define PRIXLEAST64 "I64X" +#define PRIoFAST64 "I64o" +#define PRIuFAST64 "I64u" +#define PRIxFAST64 "I64x" +#define PRIXFAST64 "I64X" + +#define PRIoMAX "I64o" +#define PRIuMAX "I64u" +#define PRIxMAX "I64x" +#define PRIXMAX "I64X" + +#define PRIoPTR "Io" +#define PRIuPTR "Iu" +#define PRIxPTR "Ix" +#define PRIXPTR "IX" + +// The fscanf macros for signed integers are: +#define SCNd8 "d" +#define SCNi8 "i" +#define SCNdLEAST8 "d" +#define SCNiLEAST8 "i" +#define SCNdFAST8 "d" +#define SCNiFAST8 "i" + +#define SCNd16 "hd" +#define SCNi16 "hi" +#define SCNdLEAST16 "hd" +#define SCNiLEAST16 "hi" +#define SCNdFAST16 "hd" +#define SCNiFAST16 "hi" + +#define SCNd32 "ld" +#define SCNi32 "li" +#define SCNdLEAST32 "ld" +#define SCNiLEAST32 "li" +#define SCNdFAST32 "ld" +#define SCNiFAST32 "li" + +#define SCNd64 "I64d" +#define SCNi64 "I64i" +#define SCNdLEAST64 "I64d" +#define SCNiLEAST64 "I64i" +#define SCNdFAST64 "I64d" +#define SCNiFAST64 "I64i" + +#define SCNdMAX "I64d" +#define SCNiMAX "I64i" + +#ifdef _WIN64 // [ +# define SCNdPTR "I64d" +# define SCNiPTR "I64i" +#else // _WIN64 ][ +# define SCNdPTR "ld" +# define SCNiPTR "li" +#endif // _WIN64 ] + +// The fscanf macros for unsigned integers are: +#define SCNo8 "o" +#define SCNu8 "u" +#define SCNx8 "x" +#define SCNX8 "X" +#define SCNoLEAST8 "o" +#define SCNuLEAST8 "u" +#define SCNxLEAST8 "x" +#define SCNXLEAST8 "X" +#define SCNoFAST8 "o" +#define SCNuFAST8 "u" +#define SCNxFAST8 "x" +#define SCNXFAST8 "X" + +#define SCNo16 "ho" +#define SCNu16 "hu" +#define SCNx16 "hx" +#define SCNX16 "hX" +#define SCNoLEAST16 "ho" +#define SCNuLEAST16 "hu" +#define SCNxLEAST16 "hx" +#define SCNXLEAST16 "hX" +#define SCNoFAST16 "ho" +#define SCNuFAST16 "hu" +#define SCNxFAST16 "hx" +#define SCNXFAST16 "hX" + +#define SCNo32 "lo" +#define SCNu32 "lu" +#define SCNx32 "lx" +#define SCNX32 "lX" +#define SCNoLEAST32 "lo" +#define SCNuLEAST32 "lu" +#define SCNxLEAST32 "lx" +#define SCNXLEAST32 "lX" +#define SCNoFAST32 "lo" +#define SCNuFAST32 "lu" +#define SCNxFAST32 "lx" +#define SCNXFAST32 "lX" + +#define SCNo64 "I64o" +#define SCNu64 "I64u" +#define SCNx64 "I64x" +#define SCNX64 "I64X" +#define SCNoLEAST64 "I64o" +#define SCNuLEAST64 "I64u" +#define SCNxLEAST64 "I64x" +#define SCNXLEAST64 "I64X" +#define SCNoFAST64 "I64o" +#define SCNuFAST64 "I64u" +#define SCNxFAST64 "I64x" +#define SCNXFAST64 "I64X" + +#define SCNoMAX "I64o" +#define SCNuMAX "I64u" +#define SCNxMAX "I64x" +#define SCNXMAX "I64X" + +#ifdef _WIN64 // [ +# define SCNoPTR "I64o" +# define SCNuPTR "I64u" +# define SCNxPTR "I64x" +# define SCNXPTR "I64X" +#else // _WIN64 ][ +# define SCNoPTR "lo" +# define SCNuPTR "lu" +# define SCNxPTR "lx" +# define SCNXPTR "lX" +#endif // _WIN64 ] + +#endif // __STDC_FORMAT_MACROS ] + +// 7.8.2 Functions for greatest-width integer types + +// 7.8.2.1 The imaxabs function +#define imaxabs _abs64 + +// 7.8.2.2 The imaxdiv function + +// This is modified version of div() function from Microsoft's div.c found +// in %MSVC.NET%\crt\src\div.c +#ifdef STATIC_IMAXDIV // [ +static +#else // STATIC_IMAXDIV ][ +_inline +#endif // STATIC_IMAXDIV ] +imaxdiv_t __cdecl imaxdiv(intmax_t numer, intmax_t denom) +{ + imaxdiv_t result; + + result.quot = numer / denom; + result.rem = numer % denom; + + if (numer < 0 && result.rem > 0) { + // did division wrong; must fix up + ++result.quot; + result.rem -= denom; + } + + return result; +} + +// 7.8.2.3 The strtoimax and strtoumax functions +#define strtoimax _strtoi64 +#define strtoumax _strtoui64 + +// 7.8.2.4 The wcstoimax and wcstoumax functions +#define wcstoimax _wcstoi64 +#define wcstoumax _wcstoui64 + + +#endif // _MSC_INTTYPES_H_ ] diff --git a/dlls/geoip/GeoIP2/maxminddb-compat-util.h b/dlls/geoip/GeoIP2/maxminddb-compat-util.h new file mode 100644 index 00000000..e781c219 --- /dev/null +++ b/dlls/geoip/GeoIP2/maxminddb-compat-util.h @@ -0,0 +1,167 @@ +#include +#include + +/* *INDENT-OFF* */ + +/* The memmem, strdup, and strndup functions were all copied from the + * FreeBSD source, along with the relevant copyright notice. + * + * It'd be nicer to simply use the functions available on the system if they + * exist, but there doesn't seem to be a good way to detect them without also + * defining things like _GNU_SOURCE, which we want to avoid, because then we + * end up _accidentally_ using GNU features without noticing, which then + * breaks on systems like OSX. + * + * C is fun! */ + +/* Applies to memmem implementation */ +/*- + * Copyright (c) 2005 Pascal Gloor + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote + * products derived from this software without specific prior written + * permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ +static void * +mmdb_memmem(const void *l, size_t l_len, const void *s, size_t s_len) +{ + register char *cur, *last; + const char *cl = (const char *)l; + const char *cs = (const char *)s; + + /* we need something to compare */ + if (l_len == 0 || s_len == 0) + return NULL; + + /* "s" must be smaller or equal to "l" */ + if (l_len < s_len) + return NULL; + + /* special case where s_len == 1 */ + if (s_len == 1) + return (void *)memchr(l, (int)*cs, l_len); + + /* the last position where its possible to find "s" in "l" */ + last = (char *)cl + l_len - s_len; + + for (cur = (char *)cl; cur <= last; cur++) + if (cur[0] == cs[0] && memcmp(cur, cs, s_len) == 0) + return cur; + + return NULL; +} + +/* Applies to strnlen implementation */ +/*- + * Copyright (c) 2009 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ +static size_t +mmdb_strnlen(const char *s, size_t maxlen) +{ + size_t len; + + for (len = 0; len < maxlen; len++, s++) { + if (!*s) + break; + } + return (len); +} + +/* Applies to strdup and strndup implementation */ +/* + * Copyright (c) 1988, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ +static char * +mmdb_strdup(const char *str) +{ + size_t len; + char *copy; + + len = strlen(str) + 1; + if ((copy = (char *)malloc(len)) == NULL) + return (NULL); + memcpy(copy, str, len); + return (copy); +} + +static char * +mmdb_strndup(const char *str, size_t n) +{ + size_t len; + char *copy; + + len = mmdb_strnlen(str, n); + if ((copy = (char *)malloc(len + 1)) == NULL) + return (NULL); + memcpy(copy, str, len); + copy[len] = '\0'; + return (copy); +} +/* *INDENT-ON* */ diff --git a/dlls/geoip/GeoIP2/maxminddb.cpp b/dlls/geoip/GeoIP2/maxminddb.cpp new file mode 100644 index 00000000..116df6f4 --- /dev/null +++ b/dlls/geoip/GeoIP2/maxminddb.cpp @@ -0,0 +1,1782 @@ +#if HAVE_CONFIG_H +#include +#endif +#include "maxminddb.h" +#include "maxminddb-compat-util.h" +#include +#include +#include +#include + +#define __STDC_FORMAT_MACROS /* Arkshine: Force to use C99 format macros */ +#include /* MSVC doesn't fully support C99, so we provide the file */ + +#ifdef _WIN32 +#include +#include +#else +#include +#include +#include +#endif + +#define MMDB_DATA_SECTION_SEPARATOR (16) + +#ifdef MMDB_DEBUG +#define LOCAL +#define NO_PROTO +#define DEBUG_FUNC +#define DEBUG_MSG(msg) fprintf(stderr, msg "\n") +#define DEBUG_MSGF(fmt, ...) fprintf(stderr, fmt "\n", __VA_ARGS__) +#define DEBUG_BINARY(fmt, byte) \ + do { \ + char *binary = byte_to_binary(byte); \ + if (NULL == binary) { \ + fprintf(stderr, "Malloc failed in DEBUG_BINARY\n"); \ + abort(); \ + } \ + fprintf(stderr, fmt "\n", binary); \ + free(binary); \ + } while (0) +#define DEBUG_NL fprintf(stderr, "\n") +#else +#define LOCAL static +#define NO_PROTO static +#define DEBUG_MSG(...) +#define DEBUG_MSGF(...) +#define DEBUG_BINARY(...) +#define DEBUG_NL +#endif + +#ifdef MMDB_DEBUG +DEBUG_FUNC char *byte_to_binary(uint8_t byte) +{ + char *bits = (char *)malloc(sizeof(char) * 9); + if (NULL == bits) { + return bits; + } + + for (uint8_t i = 0; i < 8; i++) { + bits[i] = byte & (128 >> i) ? '1' : '0'; + } + bits[8] = '\0'; + + return bits; +} + +DEBUG_FUNC char *type_num_to_name(uint8_t num) +{ + switch (num) { + case 0: + return "extended"; + case 1: + return "pointer"; + case 2: + return "utf8_string"; + case 3: + return "double"; + case 4: + return "bytes"; + case 5: + return "uint16"; + case 6: + return "uint32"; + case 7: + return "map"; + case 8: + return "int32"; + case 9: + return "uint64"; + case 10: + return "uint128"; + case 11: + return "array"; + case 12: + return "container"; + case 13: + return "end_marker"; + case 14: + return "boolean"; + case 15: + return "float"; + default: + return "unknown type"; + } +} +#endif + +typedef struct record_info_s { + uint16_t record_length; + uint32_t (*left_record_getter)(const uint8_t *); + uint32_t (*right_record_getter)(const uint8_t *); + uint8_t right_record_offset; +} record_info_s; + +#define METADATA_MARKER "\xab\xcd\xefMaxMind.com" +/* This is 128kb */ +#define METADATA_BLOCK_MAX_SIZE 131072 + +/* *INDENT-OFF* */ +/* --prototypes automatically generated by dev-bin/regen-prototypes.pl - don't remove this comment */ +LOCAL const uint8_t *find_metadata(const uint8_t *file_content, + ssize_t file_size, uint32_t *metadata_size); +LOCAL int read_metadata(MMDB_s *mmdb); +LOCAL MMDB_s make_fake_metadata_db(MMDB_s *mmdb); +LOCAL uint16_t value_for_key_as_uint16(MMDB_entry_s *start, const char *key); +LOCAL uint32_t value_for_key_as_uint32(MMDB_entry_s *start, const char *key); +LOCAL uint64_t value_for_key_as_uint64(MMDB_entry_s *start, const char *key); +LOCAL char *value_for_key_as_string(MMDB_entry_s *start, const char *key); +LOCAL int populate_languages_metadata(MMDB_s *mmdb, MMDB_s *metadata_db, + MMDB_entry_s *metadata_start); +LOCAL int populate_description_metadata(MMDB_s *mmdb, MMDB_s *metadata_db, + MMDB_entry_s *metadata_start); +LOCAL int resolve_any_address(const char *ipstr, struct addrinfo **addresses); +LOCAL int find_address_in_search_tree(MMDB_s *mmdb, uint8_t *address, + sa_family_t address_family, + MMDB_lookup_result_s *result); +LOCAL record_info_s record_info_for_database(MMDB_s *mmdb); +LOCAL MMDB_ipv4_start_node_s find_ipv4_start_node(MMDB_s *mmdb); +LOCAL int populate_result(MMDB_s *mmdb, uint32_t node_count, uint32_t value, + uint16_t netmask, MMDB_lookup_result_s *result); +LOCAL uint32_t get_left_28_bit_record(const uint8_t *record); +LOCAL uint32_t get_right_28_bit_record(const uint8_t *record); +LOCAL int lookup_path_in_array(const char *path_elem, MMDB_s *mmdb, + MMDB_entry_data_s *entry_data); +LOCAL int lookup_path_in_map(const char *path_elem, MMDB_s *mmdb, + MMDB_entry_data_s *entry_data); +LOCAL int skip_map_or_array(MMDB_s *mmdb, MMDB_entry_data_s *entry_data); +LOCAL int decode_one_follow(MMDB_s *mmdb, uint32_t offset, + MMDB_entry_data_s *entry_data); +LOCAL int decode_one(MMDB_s *mmdb, uint32_t offset, + MMDB_entry_data_s *entry_data); +LOCAL int get_ext_type(int raw_ext_type); +LOCAL uint32_t get_ptr_from(uint8_t ctrl, uint8_t const *const ptr, + int ptr_size); +LOCAL int get_entry_data_list(MMDB_s *mmdb, uint32_t offset, + MMDB_entry_data_list_s *const entry_data_list); +LOCAL float get_ieee754_float(const uint8_t *__restrict p); +LOCAL double get_ieee754_double(const uint8_t *__restrict p); +LOCAL uint32_t get_uint32(const uint8_t *p); +LOCAL uint32_t get_uint24(const uint8_t *p); +LOCAL uint32_t get_uint16(const uint8_t *p); +LOCAL uint64_t get_uintX(const uint8_t *p, int length); +LOCAL int32_t get_sintX(const uint8_t *p, int length); +LOCAL MMDB_entry_data_list_s *new_entry_data_list(void); +LOCAL void free_mmdb_struct(MMDB_s *const mmdb); +LOCAL void free_languages_metadata(MMDB_s *mmdb); +LOCAL void free_descriptions_metadata(MMDB_s *mmdb); +LOCAL MMDB_entry_data_list_s *dump_entry_data_list( + FILE *stream, MMDB_entry_data_list_s *entry_data_list, int indent, + int *status); +LOCAL void print_indentation(FILE *stream, int i); +LOCAL char *bytes_to_hex(uint8_t *bytes, uint32_t size); +/* --prototypes end - don't remove this comment-- */ +/* *INDENT-ON* */ + +#define CHECKED_DECODE_ONE(mmdb, offset, entry_data) \ + do { \ + int status = decode_one(mmdb, offset, entry_data); \ + if (MMDB_SUCCESS != status) { \ + return status; \ + } \ + } while (0) + +#define CHECKED_DECODE_ONE_FOLLOW(mmdb, offset, entry_data) \ + do { \ + int status = decode_one_follow(mmdb, offset, entry_data); \ + if (MMDB_SUCCESS != status) { \ + return status; \ + } \ + } while (0) + +int MMDB_open(const char *const filename, uint32_t flags, MMDB_s *const mmdb) +{ + mmdb->file_content = NULL; + mmdb->data_section = NULL; + mmdb->metadata.database_type = NULL; + mmdb->metadata.languages.count = 0; + mmdb->metadata.description.count = 0; + + mmdb->filename = mmdb_strdup(filename); + if (NULL == mmdb->filename) { + free_mmdb_struct(mmdb); + return MMDB_OUT_OF_MEMORY_ERROR; + } + + ssize_t size; +#ifdef _WIN32 + HANDLE fd = CreateFileA(filename, GENERIC_READ, FILE_SHARE_READ, NULL, + OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + if (fd == INVALID_HANDLE_VALUE) { + free_mmdb_struct(mmdb); + return MMDB_FILE_OPEN_ERROR; + } + size = GetFileSize(fd, NULL); +#else + int fd = open(filename, O_RDONLY); + if (fd < 0) { + free_mmdb_struct(mmdb); + return MMDB_FILE_OPEN_ERROR; + } + + struct stat s; + fstat(fd, &s); + size = s.st_size; +#endif + + if ((flags & MMDB_MODE_MASK) == 0) { + flags |= MMDB_MODE_MMAP; + } + mmdb->flags = flags; + mmdb->file_size = size; + +#ifdef _WIN32 + HANDLE mmh = CreateFileMappingA(fd, NULL, PAGE_READONLY, 0, size, filename); + uint8_t *file_content = + (uint8_t *)MapViewOfFile(mmh, FILE_MAP_READ, 0, 0, 0); + if (file_content == NULL) { + CloseHandle(mmh); + CloseHandle(fd); + free_mmdb_struct(mmdb); + return MMDB_IO_ERROR; + } +#else + uint8_t *file_content = + (uint8_t *)mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0); + if (MAP_FAILED == file_content) { + free_mmdb_struct(mmdb); + return MMDB_IO_ERROR; + } +#endif + + uint32_t metadata_size = 0; + const uint8_t *metadata = find_metadata(file_content, size, &metadata_size); + if (NULL == metadata) { + free_mmdb_struct(mmdb); + return MMDB_INVALID_METADATA_ERROR; + } + + mmdb->metadata_section = metadata; + mmdb->metadata_section_size = metadata_size; + + int status = read_metadata(mmdb); + if (MMDB_SUCCESS != status) { + free_mmdb_struct(mmdb); + return status; + } + + if (mmdb->metadata.binary_format_major_version != 2) { + free_mmdb_struct(mmdb); + return MMDB_UNKNOWN_DATABASE_FORMAT_ERROR; + } + +#ifdef _WIN32 + WSADATA wsa; + WSAStartup(MAKEWORD(2, 2), &wsa); + CloseHandle(fd); +#else + close(fd); +#endif + + uint32_t search_tree_size = mmdb->metadata.node_count * + mmdb->full_record_byte_size; + + mmdb->file_content = file_content; + mmdb->data_section = file_content + search_tree_size; + mmdb->data_section_size = mmdb->file_size - search_tree_size; + mmdb->metadata_section = metadata; + mmdb->ipv4_start_node.node_value = 0; + mmdb->ipv4_start_node.netmask = 0; + + return MMDB_SUCCESS; +} + +LOCAL const uint8_t *find_metadata(const uint8_t *file_content, + ssize_t file_size, uint32_t *metadata_size) +{ + ssize_t max_size = file_size > + METADATA_BLOCK_MAX_SIZE ? METADATA_BLOCK_MAX_SIZE : + file_size; + + uint8_t *search_area = (uint8_t *)(file_content + (file_size - max_size)); + uint8_t *tmp = search_area; + do { + tmp = (uint8_t *)mmdb_memmem(search_area, max_size, + METADATA_MARKER, strlen(METADATA_MARKER)); + + if (NULL != tmp) { + max_size -= tmp - search_area; + search_area = tmp; + } + } while (NULL != tmp && tmp != search_area); + + const uint8_t *metadata_start = search_area + strlen(METADATA_MARKER); + *metadata_size = file_size - (search_area - file_content); + + return metadata_start; +} + +LOCAL int read_metadata(MMDB_s *mmdb) +{ + /* We need to create a fake MMDB_s struct in order to decode values from + the metadata. The metadata is basically just like the data section, so we + want to use the same functions we use for the data section to get metadata + values. */ + MMDB_s metadata_db = make_fake_metadata_db(mmdb); + + MMDB_entry_s metadata_start; + metadata_start.mmdb = &metadata_db; + metadata_start.offset = 0; + + mmdb->metadata.node_count = + value_for_key_as_uint32(&metadata_start, "node_count"); + if (!mmdb->metadata.node_count) { + DEBUG_MSG("could not find node_count value in metadata"); + return MMDB_INVALID_METADATA_ERROR; + } + + mmdb->metadata.record_size = + value_for_key_as_uint16(&metadata_start, "record_size"); + if (!mmdb->metadata.record_size) { + DEBUG_MSG("could not find record_size value in metadata"); + return MMDB_INVALID_METADATA_ERROR; + } + + if (mmdb->metadata.record_size != 24 && mmdb->metadata.record_size != 28 + && mmdb->metadata.record_size != 32) { + DEBUG_MSGF("bad record size in metadata: %i", + mmdb->metadata.record_size); + return MMDB_UNKNOWN_DATABASE_FORMAT_ERROR; + } + + mmdb->metadata.ip_version = + value_for_key_as_uint16(&metadata_start, "ip_version"); + if (!mmdb->metadata.ip_version) { + DEBUG_MSG("could not find ip_version value in metadata"); + return MMDB_INVALID_METADATA_ERROR; + } + if (!(mmdb->metadata.ip_version == 4 || mmdb->metadata.ip_version == 6)) { + DEBUG_MSGF("ip_version value in metadata is not 4 or 6 - it was %i", + mmdb->metadata.ip_version); + return MMDB_INVALID_METADATA_ERROR; + } + + mmdb->metadata.database_type = + value_for_key_as_string(&metadata_start, "database_type"); + if (NULL == mmdb->metadata.database_type) { + DEBUG_MSG("could not find database_type value in metadata"); + return MMDB_INVALID_METADATA_ERROR; + } + + int status = + populate_languages_metadata(mmdb, &metadata_db, &metadata_start); + if (MMDB_SUCCESS != status) { + DEBUG_MSG("could not populate languages from metadata"); + return status; + } + + mmdb->metadata.binary_format_major_version = + value_for_key_as_uint16(&metadata_start, "binary_format_major_version"); + if (!mmdb->metadata.binary_format_major_version) { + DEBUG_MSG( + "could not find binary_format_major_version value in metadata"); + return MMDB_INVALID_METADATA_ERROR; + } + + mmdb->metadata.binary_format_minor_version = + value_for_key_as_uint16(&metadata_start, "binary_format_minor_version"); + + mmdb->metadata.build_epoch = + value_for_key_as_uint64(&metadata_start, "build_epoch"); + if (!mmdb->metadata.build_epoch) { + DEBUG_MSG("could not find build_epoch value in metadata"); + return MMDB_INVALID_METADATA_ERROR; + } + + status = populate_description_metadata(mmdb, &metadata_db, &metadata_start); + if (MMDB_SUCCESS != status) { + DEBUG_MSG("could not populate description from metadata"); + return status; + } + + mmdb->full_record_byte_size = mmdb->metadata.record_size * 2 / 8U; + + mmdb->depth = mmdb->metadata.ip_version == 4 ? 32 : 128; + + return MMDB_SUCCESS; +} + +LOCAL MMDB_s make_fake_metadata_db(MMDB_s *mmdb) +{ + MMDB_s fake_metadata_db; + fake_metadata_db.data_section = mmdb->metadata_section; + fake_metadata_db.data_section_size = mmdb->metadata_section_size; + + return fake_metadata_db; +} + +LOCAL uint16_t value_for_key_as_uint16(MMDB_entry_s *start, const char *key) +{ + MMDB_entry_data_s entry_data; + const char *path[] = { key, NULL }; + MMDB_aget_value(start, &entry_data, path); + return entry_data.uint16; +} + +LOCAL uint32_t value_for_key_as_uint32(MMDB_entry_s *start, const char *key) +{ + MMDB_entry_data_s entry_data; + const char *path[] = { key, NULL }; + MMDB_aget_value(start, &entry_data, path); + return entry_data.uint32; +} + +LOCAL uint64_t value_for_key_as_uint64(MMDB_entry_s *start, const char *key) +{ + MMDB_entry_data_s entry_data; + const char *path[] = { key, NULL }; + MMDB_aget_value(start, &entry_data, path); + return entry_data.uint64; +} + +LOCAL char *value_for_key_as_string(MMDB_entry_s *start, const char *key) +{ + MMDB_entry_data_s entry_data; + const char *path[] = { key, NULL }; + MMDB_aget_value(start, &entry_data, path); + return mmdb_strndup((char *)entry_data.utf8_string, entry_data.data_size); +} + +LOCAL int populate_languages_metadata(MMDB_s *mmdb, MMDB_s *metadata_db, + MMDB_entry_s *metadata_start) +{ + MMDB_entry_data_s entry_data; + + const char *path[] = { "languages", NULL }; + MMDB_aget_value(metadata_start, &entry_data, path); + + if (MMDB_DATA_TYPE_ARRAY != entry_data.type) { + return MMDB_INVALID_METADATA_ERROR; + } + + MMDB_entry_s array_start; + array_start.mmdb = metadata_db; + array_start.offset = entry_data.offset; + + MMDB_entry_data_list_s *member; + MMDB_get_entry_data_list(&array_start, &member); + + MMDB_entry_data_list_s *first_member = member; + + uint32_t array_size = member->entry_data.data_size; + mmdb->metadata.languages.count = 0; + mmdb->metadata.languages.names = (const char **)malloc(array_size * sizeof(char *)); + if (NULL == mmdb->metadata.languages.names) { + return MMDB_OUT_OF_MEMORY_ERROR; + } + + for (uint32_t i = 0; i < array_size; i++) { + member = member->next; + if (MMDB_DATA_TYPE_UTF8_STRING != member->entry_data.type) { + return MMDB_INVALID_METADATA_ERROR; + } + + mmdb->metadata.languages.names[i] = + mmdb_strndup((char *)member->entry_data.utf8_string, + member->entry_data.data_size); + + if (NULL == mmdb->metadata.languages.names[i]) { + return MMDB_OUT_OF_MEMORY_ERROR; + } + // We assign this as we go so that if we fail a malloc and need to + // free it, the count is right. + mmdb->metadata.languages.count = i + 1; + } + + MMDB_free_entry_data_list(first_member); + + return MMDB_SUCCESS; +} + +LOCAL int populate_description_metadata(MMDB_s *mmdb, MMDB_s *metadata_db, + MMDB_entry_s *metadata_start) +{ + MMDB_entry_data_s entry_data; + + const char *path[] = { "description", NULL }; + MMDB_aget_value(metadata_start, &entry_data, path); + + if (MMDB_DATA_TYPE_MAP != entry_data.type) { + return MMDB_INVALID_METADATA_ERROR; + } + + MMDB_entry_s map_start; + map_start.mmdb = metadata_db; + map_start.offset = entry_data.offset; + + MMDB_entry_data_list_s *member; + MMDB_get_entry_data_list(&map_start, &member); + + MMDB_entry_data_list_s *first_member = member; + + uint32_t map_size = member->entry_data.data_size; + mmdb->metadata.description.count = 0; + mmdb->metadata.description.descriptions = + (MMDB_description_s **)malloc(map_size * sizeof(MMDB_description_s *)); + if (NULL == mmdb->metadata.description.descriptions) { + return MMDB_OUT_OF_MEMORY_ERROR; + } + + for (uint32_t i = 0; i < map_size; i++) { + mmdb->metadata.description.descriptions[i] = + (MMDB_description_s *)malloc(sizeof(MMDB_description_s)); + if (NULL == mmdb->metadata.description.descriptions[i]) { + return MMDB_OUT_OF_MEMORY_ERROR; + } + + mmdb->metadata.description.count = i + 1; + mmdb->metadata.description.descriptions[i]->language = NULL; + mmdb->metadata.description.descriptions[i]->description = NULL; + + member = member->next; + + if (MMDB_DATA_TYPE_UTF8_STRING != member->entry_data.type) { + return MMDB_INVALID_METADATA_ERROR; + } + + mmdb->metadata.description.descriptions[i]->language = + mmdb_strndup((char *)member->entry_data.utf8_string, + member->entry_data.data_size); + + if (NULL == mmdb->metadata.description.descriptions[i]->language) { + return MMDB_OUT_OF_MEMORY_ERROR; + } + + member = member->next; + + if (MMDB_DATA_TYPE_UTF8_STRING != member->entry_data.type) { + return MMDB_INVALID_METADATA_ERROR; + } + + mmdb->metadata.description.descriptions[i]->description = + mmdb_strndup((char *)member->entry_data.utf8_string, + member->entry_data.data_size); + + if (NULL == mmdb->metadata.description.descriptions[i]->description) { + return MMDB_OUT_OF_MEMORY_ERROR; + } + } + + MMDB_free_entry_data_list(first_member); + + return MMDB_SUCCESS; +} + +MMDB_lookup_result_s MMDB_lookup_string(MMDB_s *const mmdb, + const char *const ipstr, + int *const gai_error, + int *const mmdb_error) +{ + MMDB_lookup_result_s result; + result.found_entry = false; + result.netmask = 0; + result.entry.mmdb = mmdb; + result.entry.offset = 0; + + struct addrinfo *addresses = NULL; + *gai_error = resolve_any_address(ipstr, &addresses); + + if (*gai_error) { + if (NULL != addresses) { + freeaddrinfo(addresses); + } + return result; + } + + if (mmdb->metadata.ip_version == 4 + && addresses->ai_addr->sa_family == AF_INET6) { + + *mmdb_error = MMDB_IPV6_LOOKUP_IN_IPV4_DATABASE_ERROR; + freeaddrinfo(addresses); + return result; + } + + result = MMDB_lookup_sockaddr(mmdb, addresses->ai_addr, mmdb_error); + + freeaddrinfo(addresses); + + return result; +} + +LOCAL int resolve_any_address(const char *ipstr, struct addrinfo **addresses) +{ + struct addrinfo hints; + memset(&hints, 0, sizeof(addrinfo)); // getaddrinfo doesn't like garbage. + + hints.ai_socktype = SOCK_STREAM; + int gai_status; + + if (NULL != strchr(ipstr, ':')) { + hints.ai_flags = AI_NUMERICHOST; +#if defined AI_V4MAPPED && !defined __FreeBSD__ + hints.ai_flags |= AI_V4MAPPED; +#endif + hints.ai_family = AF_INET6; + } else { + hints.ai_flags = AI_NUMERICHOST; + hints.ai_family = AF_INET; + } + + gai_status = getaddrinfo(ipstr, NULL, &hints, addresses); + if (gai_status) { + return gai_status; + } + + return 0; +} + +MMDB_lookup_result_s MMDB_lookup_sockaddr( + MMDB_s *const mmdb, + const struct sockaddr *const sockaddr, + int *const mmdb_error) +{ + MMDB_lookup_result_s result; + result.found_entry = false; + result.netmask = 0; + result.entry.mmdb = mmdb; + result.entry.offset = 0; + + uint8_t mapped_address[16], *address; + if (mmdb->metadata.ip_version == 4) { + if (sockaddr->sa_family == AF_INET6) { + return result; + } + address = (uint8_t *)&((struct sockaddr_in *)sockaddr)->sin_addr.s_addr; + } else { + if (sockaddr->sa_family == AF_INET6) { + address = + (uint8_t *)&((struct sockaddr_in6 *)sockaddr)->sin6_addr. + s6_addr; + } else { + address = mapped_address; + memset(address, 0, 12); + memcpy(address + 12, + &((struct sockaddr_in *)sockaddr)->sin_addr.s_addr, 4); + } + } + + *mmdb_error = + find_address_in_search_tree(mmdb, address, sockaddr->sa_family, + &result); + + return result; +} + +LOCAL int find_address_in_search_tree(MMDB_s *mmdb, uint8_t *address, + sa_family_t address_family, + MMDB_lookup_result_s *result) +{ + record_info_s record_info = record_info_for_database(mmdb); + if (0 == record_info.right_record_offset) { + return MMDB_UNKNOWN_DATABASE_FORMAT_ERROR; + } + + DEBUG_NL; + DEBUG_MSG("Looking for address in search tree"); + + uint32_t node_count = mmdb->metadata.node_count; + uint32_t value = 0; + uint16_t max_depth0 = mmdb->depth - 1; + uint16_t start_bit = max_depth0; + + if (mmdb->metadata.ip_version == 6 && address_family == AF_INET) { + MMDB_ipv4_start_node_s ipv4_start_node = find_ipv4_start_node(mmdb); + DEBUG_MSGF("IPv4 start node is %u (netmask %u)", + ipv4_start_node.node_value, ipv4_start_node.netmask); + /* We have an IPv6 database with no IPv4 data */ + if (ipv4_start_node.node_value >= node_count) { + return populate_result(mmdb, node_count, ipv4_start_node.node_value, + ipv4_start_node.netmask, result); + } + + value = ipv4_start_node.node_value; + start_bit -= ipv4_start_node.netmask; + } + + const uint8_t *search_tree = mmdb->file_content; + const uint8_t *record_pointer; + for (int current_bit = start_bit; current_bit >= 0; current_bit--) { + uint8_t bit_is_true = + address[(max_depth0 - current_bit) >> 3] + & (1U << (~(max_depth0 - current_bit) & 7)) ? 1 : 0; + + DEBUG_MSGF("Looking at bit %i - bit's value is %i", current_bit, + bit_is_true); + DEBUG_MSGF(" current node = %u", value); + + record_pointer = &search_tree[value * record_info.record_length]; + if (bit_is_true) { + record_pointer += record_info.right_record_offset; + value = record_info.right_record_getter(record_pointer); + } else { + value = record_info.left_record_getter(record_pointer); + } + + /* Ideally we'd check to make sure that a record never points to a + * previously seen value, but that's more complicated. For now, we can + * at least check that we don't end up at the top of the tree again. */ + if (0 == value) { + DEBUG_MSGF(" %s record has a value of 0", + bit_is_true ? "right" : "left"); + return MMDB_CORRUPT_SEARCH_TREE_ERROR; + } + + if (value >= node_count) { + return populate_result(mmdb, node_count, value, current_bit, result); + } else { + DEBUG_MSGF(" proceeding to search tree node %i", value); + } + } + + DEBUG_MSG( + "Reached the end of the address bits without leaving the search tree"); + + // We should not be able to reach this return. If we do, something very bad happened. + return MMDB_CORRUPT_SEARCH_TREE_ERROR; +} + +LOCAL record_info_s record_info_for_database(MMDB_s *mmdb) +{ + record_info_s record_info; + record_info.record_length = mmdb->full_record_byte_size; + record_info.right_record_offset = 0; + + if (record_info.record_length == 6) { + record_info.left_record_getter = &get_uint24; + record_info.right_record_getter = &get_uint24; + record_info.right_record_offset = 3; + } else if (record_info.record_length == 7) { + record_info.left_record_getter = &get_left_28_bit_record; + record_info.right_record_getter = &get_right_28_bit_record; + record_info.right_record_offset = 3; + } else if (record_info.record_length == 8) { + record_info.left_record_getter = &get_uint32; + record_info.right_record_getter = &get_uint32; + record_info.right_record_offset = 4; + } + + return record_info; +} + +LOCAL MMDB_ipv4_start_node_s find_ipv4_start_node(MMDB_s *mmdb) +{ + /* In a pathological case of a database with a single node search tree, + * this check will be true even after we've found the IPv4 start node, but + * that doesn't seem worth trying to fix. */ + if (mmdb->ipv4_start_node.node_value != 0) { + return mmdb->ipv4_start_node; + } + + record_info_s record_info = record_info_for_database(mmdb); + + const uint8_t *search_tree = mmdb->file_content; + uint32_t node_value = 0; + const uint8_t *record_pointer; + uint32_t netmask; + for (netmask = 0; netmask < 96; netmask++) { + record_pointer = &search_tree[node_value * record_info.record_length]; + node_value = record_info.left_record_getter(record_pointer); + /* This can happen if there's no IPv4 data _or_ if there is a subnet + * with data that contains the entire IPv4 range (like ::/64) */ + if (node_value >= mmdb->metadata.node_count) { + break; + } + } + + mmdb->ipv4_start_node.node_value = node_value; + mmdb->ipv4_start_node.netmask = netmask; + + return mmdb->ipv4_start_node; +} + +LOCAL int populate_result(MMDB_s *mmdb, uint32_t node_count, uint32_t value, + uint16_t netmask, MMDB_lookup_result_s *result) +{ + uint32_t offset = value - node_count; + DEBUG_MSGF(" data section offset is %i (record value = %i)", offset, value); + + if (offset > mmdb->data_section_size) { + return MMDB_CORRUPT_SEARCH_TREE_ERROR; + } + + result->netmask = mmdb->depth - netmask; + result->entry.offset = offset; + result->found_entry = result->entry.offset > 0 ? true : false; + return MMDB_SUCCESS; +} + +LOCAL uint32_t get_left_28_bit_record(const uint8_t *record) +{ + return record[0] * 65536 + record[1] * 256 + record[2] + + ((record[3] & 0xf0) << 20); +} + +LOCAL uint32_t get_right_28_bit_record(const uint8_t *record) +{ + uint32_t value = get_uint32(record); + return value & 0xfffffff; +} + +int MMDB_read_node(MMDB_s *const mmdb, uint32_t node_number, + MMDB_search_node_s *const node) +{ + record_info_s record_info = record_info_for_database(mmdb); + if (0 == record_info.right_record_offset) { + return MMDB_UNKNOWN_DATABASE_FORMAT_ERROR; + } + + if (node_number > mmdb->metadata.node_count) { + return MMDB_INVALID_NODE_NUMBER_ERROR; + } + + const uint8_t *search_tree = mmdb->file_content; + const uint8_t *record_pointer = + &search_tree[node_number * record_info.record_length]; + node->left_record = record_info.left_record_getter(record_pointer); + record_pointer += record_info.right_record_offset; + node->right_record = record_info.right_record_getter(record_pointer); + + return MMDB_SUCCESS; +} + +int MMDB_get_value(MMDB_entry_s *const start, + MMDB_entry_data_s *const entry_data, + ...) +{ + va_list path; + va_start(path, entry_data); + int status = MMDB_vget_value(start, entry_data, path); + va_end(path); + return status; +} + +int MMDB_vget_value(MMDB_entry_s *const start, + MMDB_entry_data_s *const entry_data, + va_list va_path) +{ + const char **path = NULL; + + int i = 0; + const char *path_elem; + while (NULL != (path_elem = va_arg(va_path, char *))) { + path = (const char **)realloc(path, sizeof(const char *) * (i + 1)); + if (NULL == path) { + return MMDB_OUT_OF_MEMORY_ERROR; + } + + path[i] = mmdb_strdup(path_elem); + if (NULL == path[i]) { + return MMDB_OUT_OF_MEMORY_ERROR; + } + i++; + } + + path = (const char **)realloc(path, sizeof(char *) * (i + 1)); + if (NULL == path) { + return MMDB_OUT_OF_MEMORY_ERROR; + } + path[i] = NULL; + + int status = MMDB_aget_value(start, entry_data, path); + + i = 0; + while (NULL != path[i]) { + free((void *)path[i]); + i++; + } + free(path); + + return status; +} + +int MMDB_aget_value(MMDB_entry_s *const start, + MMDB_entry_data_s *const entry_data, + const char *const *const path) +{ + MMDB_s *mmdb = start->mmdb; + uint32_t offset = start->offset; + + memset(entry_data, 0, sizeof(MMDB_entry_data_s)); + DEBUG_NL; + DEBUG_MSG("looking up value by path"); + + CHECKED_DECODE_ONE_FOLLOW(mmdb, offset, entry_data); + + DEBUG_NL; + DEBUG_MSGF("top level element is a %s", type_num_to_name(entry_data->type)); + + /* Can this happen? It'd probably represent a pathological case under + * normal use, but there's nothing preventing someone from passing an + * invalid MMDB_entry_s struct to this function */ + if (!entry_data->has_data) { + return MMDB_INVALID_LOOKUP_PATH_ERROR; + } + + const char *path_elem; + int i = 0; + while (NULL != (path_elem = path[i++])) { + DEBUG_NL; + DEBUG_MSGF("path elem = %s", path_elem); + + /* XXX - it'd be good to find a quicker way to skip through these + entries that doesn't involve decoding them + completely. Basically we need to just use the size from the + control byte to advance our pointer rather than calling + decode_one(). */ + if (entry_data->type == MMDB_DATA_TYPE_ARRAY) { + int status = lookup_path_in_array(path_elem, mmdb, entry_data); + if (MMDB_SUCCESS != status) { + memset(entry_data, 0, sizeof(MMDB_entry_data_s)); + return status; + } + } else if (entry_data->type == MMDB_DATA_TYPE_MAP) { + int status = lookup_path_in_map(path_elem, mmdb, entry_data); + if (MMDB_SUCCESS != status) { + memset(entry_data, 0, sizeof(MMDB_entry_data_s)); + return status; + } + } else { + /* Once we make the code traverse maps & arrays without calling + * decode_one() we can get rid of this. */ + memset(entry_data, 0, sizeof(MMDB_entry_data_s)); + return MMDB_LOOKUP_PATH_DOES_NOT_MATCH_DATA_ERROR; + } + } + + return MMDB_SUCCESS; +} + +LOCAL int lookup_path_in_array(const char *path_elem, MMDB_s *mmdb, + MMDB_entry_data_s *entry_data) +{ + uint32_t size = entry_data->data_size; + int array_index = strtol(path_elem, NULL, 10); + if (array_index < 0) { + return MMDB_INVALID_LOOKUP_PATH_ERROR; + } + + if ((uint32_t)array_index >= size) { + memset(entry_data, 0, sizeof(MMDB_entry_data_s)); + return MMDB_LOOKUP_PATH_DOES_NOT_MATCH_DATA_ERROR; + } + + for (int i = 0; i < array_index; i++) { + /* We don't want to follow a pointer here. If the next element is a + * pointer we simply skip it and keep going */ + CHECKED_DECODE_ONE(mmdb, entry_data->offset_to_next, entry_data); + int status = skip_map_or_array(mmdb, entry_data); + if (MMDB_SUCCESS != status) { + return status; + } + } + + MMDB_entry_data_s value; + CHECKED_DECODE_ONE_FOLLOW(mmdb, entry_data->offset_to_next, &value); + memcpy(entry_data, &value, sizeof(MMDB_entry_data_s)); + + return MMDB_SUCCESS; +} + +LOCAL int lookup_path_in_map(const char *path_elem, MMDB_s *mmdb, + MMDB_entry_data_s *entry_data) +{ + uint32_t size = entry_data->data_size; + uint32_t offset = entry_data->offset_to_next; + size_t path_elem_len = strlen(path_elem); + + while (size-- > 0) { + MMDB_entry_data_s key, value; + CHECKED_DECODE_ONE_FOLLOW(mmdb, offset, &key); + + uint32_t offset_to_value = key.offset_to_next; + + if (MMDB_DATA_TYPE_UTF8_STRING != key.type) { + return MMDB_INVALID_DATA_ERROR; + } + + if (key.data_size == path_elem_len && + !memcmp(path_elem, key.utf8_string, path_elem_len)) { + + DEBUG_MSG("found key matching path elem"); + + CHECKED_DECODE_ONE_FOLLOW(mmdb, offset_to_value, &value); + memcpy(entry_data, &value, sizeof(MMDB_entry_data_s)); + return MMDB_SUCCESS; + } else { + /* We don't want to follow a pointer here. If the next element is + * a pointer we simply skip it and keep going */ + CHECKED_DECODE_ONE(mmdb, offset_to_value, &value); + int status = skip_map_or_array(mmdb, &value); + if (MMDB_SUCCESS != status) { + return status; + } + offset = value.offset_to_next; + } + } + + memset(entry_data, 0, sizeof(MMDB_entry_data_s)); + return MMDB_LOOKUP_PATH_DOES_NOT_MATCH_DATA_ERROR; +} + +LOCAL int skip_map_or_array(MMDB_s *mmdb, MMDB_entry_data_s *entry_data) +{ + if (entry_data->type == MMDB_DATA_TYPE_MAP) { + uint32_t size = entry_data->data_size; + while (size-- > 0) { + CHECKED_DECODE_ONE(mmdb, entry_data->offset_to_next, entry_data); // key + CHECKED_DECODE_ONE(mmdb, entry_data->offset_to_next, entry_data); // value + int status = skip_map_or_array(mmdb, entry_data); + if (MMDB_SUCCESS != status) { + return status; + } + } + } else if (entry_data->type == MMDB_DATA_TYPE_ARRAY) { + uint32_t size = entry_data->data_size; + while (size-- > 0) { + CHECKED_DECODE_ONE(mmdb, entry_data->offset_to_next, entry_data); // value + int status = skip_map_or_array(mmdb, entry_data); + if (MMDB_SUCCESS != status) { + return status; + } + } + } + + return MMDB_SUCCESS; +} + +LOCAL int decode_one_follow(MMDB_s *mmdb, uint32_t offset, + MMDB_entry_data_s *entry_data) +{ + CHECKED_DECODE_ONE(mmdb, offset, entry_data); + if (entry_data->type == MMDB_DATA_TYPE_POINTER) { + /* The pointer could point to any part of the data section but the + * next entry for this particular offset may be the one after the + * pointer, not the one after whatever the pointer points to. This + * depends on whether the pointer points to something that is a simple + * value or a compound value. For a compound value, the next one is + * the one after the pointer result, not the one after the pointer. */ + uint32_t next = entry_data->offset_to_next; + CHECKED_DECODE_ONE(mmdb, entry_data->pointer, entry_data); + if (entry_data->type != MMDB_DATA_TYPE_MAP + && entry_data->type != MMDB_DATA_TYPE_ARRAY) { + + entry_data->offset_to_next = next; + } + } + + return MMDB_SUCCESS; +} + +#if !MMDB_UINT128_IS_BYTE_ARRAY +NO_PROTO mmdb_uint128_t get_uint128(const uint8_t *p, int length) +{ + mmdb_uint128_t value = 0; + while (length-- > 0) { + value <<= 8; + value += *p++; + } + return value; +} +#endif + +LOCAL int decode_one(MMDB_s *mmdb, uint32_t offset, + MMDB_entry_data_s *entry_data) +{ + const uint8_t *mem = mmdb->data_section; + + if (offset > mmdb->data_section_size) { + return MMDB_INVALID_DATA_ERROR; + } + + entry_data->offset = offset; + entry_data->has_data = true; + + DEBUG_NL; + DEBUG_MSGF("Offset: %i", offset); + + uint8_t ctrl = mem[offset++]; + DEBUG_BINARY("Control byte: %s", ctrl); + + int type = (ctrl >> 5) & 7; + DEBUG_MSGF("Type: %i (%s)", type, type_num_to_name(type)); + + if (type == MMDB_DATA_TYPE_EXTENDED) { + type = get_ext_type(mem[offset++]); + DEBUG_MSGF("Extended type: %i (%s)", type, type_num_to_name(type)); + } + + entry_data->type = type; + + if (type == MMDB_DATA_TYPE_POINTER) { + int psize = (ctrl >> 3) & 3; + DEBUG_MSGF("Pointer size: %i", psize); + + entry_data->pointer = get_ptr_from(ctrl, &mem[offset], psize); + DEBUG_MSGF("Pointer to: %i", entry_data->pointer); + + entry_data->data_size = psize + 1; + entry_data->offset_to_next = offset + psize + 1; + return MMDB_SUCCESS; + } + + uint32_t size = ctrl & 31; + switch (size) { + case 29: + size = 29 + mem[offset++]; + break; + case 30: + size = 285 + get_uint16(&mem[offset]); + offset += 2; + break; + case 31: + size = 65821 + get_uint24(&mem[offset]); + offset += 3; + default: + break; + } + + DEBUG_MSGF("Size: %i", size); + + if (type == MMDB_DATA_TYPE_MAP || type == MMDB_DATA_TYPE_ARRAY) { + entry_data->data_size = size; + entry_data->offset_to_next = offset; + return MMDB_SUCCESS; + } + + if (type == MMDB_DATA_TYPE_BOOLEAN) { + entry_data->boolean = size ? true : false; + entry_data->data_size = 0; + entry_data->offset_to_next = offset; + DEBUG_MSGF("boolean value: %s", entry_data->boolean ? "true" : "false"); + return MMDB_SUCCESS; + } + + if (type == MMDB_DATA_TYPE_UINT16) { + if (size > 2) { + return MMDB_INVALID_DATA_ERROR; + } + entry_data->uint16 = (uint16_t)get_uintX(&mem[offset], size); + DEBUG_MSGF("uint16 value: %u", entry_data->uint16); + } else if (type == MMDB_DATA_TYPE_UINT32) { + if (size > 4) { + return MMDB_INVALID_DATA_ERROR; + } + entry_data->uint32 = (uint32_t)get_uintX(&mem[offset], size); + DEBUG_MSGF("uint32 value: %u", entry_data->uint32); + } else if (type == MMDB_DATA_TYPE_INT32) { + if (size > 4) { + return MMDB_INVALID_DATA_ERROR; + } + entry_data->int32 = get_sintX(&mem[offset], size); + DEBUG_MSGF("int32 value: %i", entry_data->int32); + } else if (type == MMDB_DATA_TYPE_UINT64) { + if (size > 8) { + return MMDB_INVALID_DATA_ERROR; + } + entry_data->uint64 = get_uintX(&mem[offset], size); + DEBUG_MSGF("uint64 value: %" PRIu64, entry_data->uint64); + } else if (type == MMDB_DATA_TYPE_UINT128) { + if (size > 16) { + return MMDB_INVALID_DATA_ERROR; + } +#if MMDB_UINT128_IS_BYTE_ARRAY + memset(entry_data->uint128, 0, 16); + if (size > 0) { + memcpy(entry_data->uint128 + 16 - size, &mem[offset], size); + } +#else + entry_data->uint128 = get_uint128(&mem[offset], size); +#endif + } else if (type == MMDB_DATA_TYPE_FLOAT) { + if (size != 4) { + return MMDB_INVALID_DATA_ERROR; + } + size = 4; + entry_data->float_value = get_ieee754_float(&mem[offset]); + DEBUG_MSGF("float value: %f", entry_data->float_value); + } else if (type == MMDB_DATA_TYPE_DOUBLE) { + if (size != 8) { + return MMDB_INVALID_DATA_ERROR; + } + size = 8; + entry_data->double_value = get_ieee754_double(&mem[offset]); + DEBUG_MSGF("double value: %f", entry_data->double_value); + } else if (type == MMDB_DATA_TYPE_UTF8_STRING) { + entry_data->utf8_string = size == 0 ? "" : (char *)&mem[offset]; + entry_data->data_size = size; +#ifdef MMDB_DEBUG + char *string = mmdb_strndup(entry_data->utf8_string, + size > 50 ? 50 : size); + if (NULL == string) { + abort(); + } + DEBUG_MSGF("string value: %s", string); + free(string); +#endif + } else if (type == MMDB_DATA_TYPE_BYTES) { + entry_data->bytes = &mem[offset]; + entry_data->data_size = size; + } + + entry_data->offset_to_next = offset + size; + + return MMDB_SUCCESS; +} + +LOCAL int get_ext_type(int raw_ext_type) +{ + return 7 + raw_ext_type; +} + +LOCAL uint32_t get_ptr_from(uint8_t ctrl, uint8_t const *const ptr, + int ptr_size) +{ + uint32_t new_offset; + switch (ptr_size) { + case 0: + new_offset = (ctrl & 7) * 256 + ptr[0]; + break; + case 1: + new_offset = 2048 + (ctrl & 7) * 65536 + ptr[0] * 256 + ptr[1]; + break; + case 2: + new_offset = 2048 + 524288 + (ctrl & 7) * 16777216 + get_uint24(ptr); + break; + case 3: + default: + new_offset = get_uint32(ptr); + break; + } + return MMDB_DATA_SECTION_SEPARATOR + new_offset; +} + +int MMDB_get_metadata_as_entry_data_list( + MMDB_s *const mmdb, MMDB_entry_data_list_s **const entry_data_list) +{ + MMDB_s metadata_db = make_fake_metadata_db(mmdb); + + MMDB_entry_s metadata_start; + metadata_start.mmdb = &metadata_db; + metadata_start.offset = 0; + + return MMDB_get_entry_data_list(&metadata_start, entry_data_list); +} + +int MMDB_get_entry_data_list( + MMDB_entry_s *start, MMDB_entry_data_list_s **const entry_data_list) +{ + *entry_data_list = new_entry_data_list(); + if (NULL == entry_data_list) { + return MMDB_OUT_OF_MEMORY_ERROR; + } + return get_entry_data_list(start->mmdb, start->offset, *entry_data_list); +} + +LOCAL int get_entry_data_list(MMDB_s *mmdb, uint32_t offset, + MMDB_entry_data_list_s *const entry_data_list) +{ + CHECKED_DECODE_ONE(mmdb, offset, &entry_data_list->entry_data); + + switch (entry_data_list->entry_data.type) { + case MMDB_DATA_TYPE_POINTER: + { + uint32_t next_offset = entry_data_list->entry_data.offset_to_next; + uint32_t last_offset; + while (entry_data_list->entry_data.type == + MMDB_DATA_TYPE_POINTER) { + CHECKED_DECODE_ONE(mmdb, last_offset = + entry_data_list->entry_data.pointer, + &entry_data_list->entry_data); + } + + if (entry_data_list->entry_data.type == MMDB_DATA_TYPE_ARRAY + || entry_data_list->entry_data.type == MMDB_DATA_TYPE_MAP) { + + int status = + get_entry_data_list(mmdb, last_offset, entry_data_list); + if (MMDB_SUCCESS != status) { + return status; + } + } + entry_data_list->entry_data.offset_to_next = next_offset; + } + break; + case MMDB_DATA_TYPE_ARRAY: + { + uint32_t array_size = entry_data_list->entry_data.data_size; + uint32_t array_offset = entry_data_list->entry_data.offset_to_next; + MMDB_entry_data_list_s *previous = entry_data_list; + while (array_size-- > 0) { + MMDB_entry_data_list_s *entry_data_list_to = previous->next = + new_entry_data_list(); + if (NULL == entry_data_list_to) { + return MMDB_OUT_OF_MEMORY_ERROR; + } + + int status = + get_entry_data_list(mmdb, array_offset, entry_data_list_to); + if (MMDB_SUCCESS != status) { + return status; + } + + array_offset = entry_data_list_to->entry_data.offset_to_next; + while (previous->next) { + previous = previous->next; + } + } + entry_data_list->entry_data.offset_to_next = array_offset; + + } + break; + case MMDB_DATA_TYPE_MAP: + { + uint32_t size = entry_data_list->entry_data.data_size; + + offset = entry_data_list->entry_data.offset_to_next; + MMDB_entry_data_list_s *previous = entry_data_list; + while (size-- > 0) { + MMDB_entry_data_list_s *entry_data_list_to = previous->next = + new_entry_data_list(); + if (NULL == entry_data_list_to) { + return MMDB_OUT_OF_MEMORY_ERROR; + } + + int status = + get_entry_data_list(mmdb, offset, entry_data_list_to); + if (MMDB_SUCCESS != status) { + return status; + } + + while (previous->next) { + previous = previous->next; + } + + offset = entry_data_list_to->entry_data.offset_to_next; + entry_data_list_to = previous->next = + new_entry_data_list(); + + if (NULL == entry_data_list_to) { + return MMDB_OUT_OF_MEMORY_ERROR; + } + + status = get_entry_data_list(mmdb, offset, entry_data_list_to); + if (MMDB_SUCCESS != status) { + return status; + } + + while (previous->next) { + previous = previous->next; + } + offset = entry_data_list_to->entry_data.offset_to_next; + } + entry_data_list->entry_data.offset_to_next = offset; + } + break; + default: + break; + } + + return MMDB_SUCCESS; +} + +LOCAL float get_ieee754_float(const uint8_t *__restrict p) +{ + volatile float f; + uint8_t *q = (uint8_t *)(void *)&f; +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ + q[3] = p[0]; + q[2] = p[1]; + q[1] = p[2]; + q[0] = p[3]; +#else + memcpy(q, p, 4); +#endif + return f; +} + +LOCAL double get_ieee754_double(const uint8_t *__restrict p) +{ + volatile double d; + uint8_t *q = (uint8_t *)(void *)&d; +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ + q[7] = p[0]; + q[6] = p[1]; + q[5] = p[2]; + q[4] = p[3]; + q[3] = p[4]; + q[2] = p[5]; + q[1] = p[6]; + q[0] = p[7]; +#else + memcpy(q, p, 8); +#endif + + return d; +} + +LOCAL uint32_t get_uint32(const uint8_t *p) +{ + return p[0] * 16777216U + p[1] * 65536 + p[2] * 256 + p[3]; +} + +LOCAL uint32_t get_uint24(const uint8_t *p) +{ + return p[0] * 65536U + p[1] * 256 + p[2]; +} + +LOCAL uint32_t get_uint16(const uint8_t *p) +{ + return p[0] * 256U + p[1]; +} + +LOCAL uint64_t get_uintX(const uint8_t *p, int length) +{ + uint64_t value = 0; + while (length-- > 0) { + value <<= 8; + value += *p++; + } + return value; +} + +LOCAL int32_t get_sintX(const uint8_t *p, int length) +{ + return (int32_t)get_uintX(p, length); +} + +LOCAL MMDB_entry_data_list_s *new_entry_data_list(void) +{ + /* We need calloc here in order to ensure that the ->next pointer in the + * struct doesn't point to some random address. */ + return (MMDB_entry_data_list_s *)calloc(1, sizeof(MMDB_entry_data_list_s)); +} + +void MMDB_free_entry_data_list(MMDB_entry_data_list_s *const entry_data_list) +{ + if (entry_data_list == NULL) { + return; + } + if (entry_data_list->next) { + MMDB_free_entry_data_list(entry_data_list->next); + } + free(entry_data_list); +} + +void MMDB_close(MMDB_s *const mmdb) +{ + free_mmdb_struct(mmdb); +} + +LOCAL void free_mmdb_struct(MMDB_s *const mmdb) +{ + if (!mmdb) { + return; + } + + if (NULL != mmdb->filename) { + free((void *)mmdb->filename); + } + if (NULL != mmdb->file_content) { +#ifdef _WIN32 + UnmapViewOfFile(mmdb->file_content); + /* Winsock is only initialized if open was successful so we only have + * to cleanup then. */ + WSACleanup(); +#else + munmap((void *)mmdb->file_content, mmdb->file_size); +#endif + } + + if (NULL != mmdb->metadata.database_type) { + free((void *)mmdb->metadata.database_type); + } + + free_languages_metadata(mmdb); + free_descriptions_metadata(mmdb); +} + +LOCAL void free_languages_metadata(MMDB_s *mmdb) +{ + if (!mmdb->metadata.languages.count) { + return; + } + + for (size_t i = 0; i < mmdb->metadata.languages.count; i++) { + free((char *)mmdb->metadata.languages.names[i]); + } + free(mmdb->metadata.languages.names); +} + +LOCAL void free_descriptions_metadata(MMDB_s *mmdb) +{ + if (!mmdb->metadata.description.count) { + return; + } + + for (size_t i = 0; i < mmdb->metadata.description.count; i++) { + if (NULL != mmdb->metadata.description.descriptions[i]) { + if (NULL != + mmdb->metadata.description.descriptions[i]->language) { + free( + (char *)mmdb->metadata.description.descriptions[i]-> + language); + } + + if (NULL != + mmdb->metadata.description.descriptions[i]->description) { + free( + (char *)mmdb->metadata.description.descriptions[i]-> + description); + } + free(mmdb->metadata.description.descriptions[i]); + } + } + + free(mmdb->metadata.description.descriptions); +} + +const char *MMDB_lib_version(void) +{ + return PACKAGE_VERSION; +} + +int MMDB_dump_entry_data_list(FILE *const stream, + MMDB_entry_data_list_s *const entry_data_list, + int indent) +{ + int status; + dump_entry_data_list(stream, entry_data_list, indent, &status); + return status; +} + +LOCAL MMDB_entry_data_list_s *dump_entry_data_list( + FILE *stream, MMDB_entry_data_list_s *entry_data_list, int indent, + int *status) +{ + switch (entry_data_list->entry_data.type) { + case MMDB_DATA_TYPE_MAP: + { + uint32_t size = entry_data_list->entry_data.data_size; + + print_indentation(stream, indent); + fprintf(stream, "{\n"); + indent += 2; + + for (entry_data_list = entry_data_list->next; + size && entry_data_list; size--) { + + char *key = + mmdb_strndup( + (char *)entry_data_list->entry_data.utf8_string, + entry_data_list->entry_data.data_size); + if (NULL == key) { + *status = MMDB_OUT_OF_MEMORY_ERROR; + return NULL; + } + + print_indentation(stream, indent); + fprintf(stream, "\"%s\": \n", key); + free(key); + + entry_data_list = entry_data_list->next; + entry_data_list = + dump_entry_data_list(stream, entry_data_list, indent + 2, + status); + + if (MMDB_SUCCESS != *status) { + return NULL; + } + } + + indent -= 2; + print_indentation(stream, indent); + fprintf(stream, "}\n"); + } + break; + case MMDB_DATA_TYPE_ARRAY: + { + uint32_t size = entry_data_list->entry_data.data_size; + + print_indentation(stream, indent); + fprintf(stream, "[\n"); + indent += 2; + + for (entry_data_list = entry_data_list->next; + size && entry_data_list; size--) { + entry_data_list = + dump_entry_data_list(stream, entry_data_list, indent, + status); + if (MMDB_SUCCESS != *status) { + return NULL; + } + } + + indent -= 2; + print_indentation(stream, indent); + fprintf(stream, "]\n"); + } + break; + case MMDB_DATA_TYPE_UTF8_STRING: + { + char *string = + mmdb_strndup((char *)entry_data_list->entry_data.utf8_string, + entry_data_list->entry_data.data_size); + if (NULL == string) { + *status = MMDB_OUT_OF_MEMORY_ERROR; + return NULL; + } + print_indentation(stream, indent); + fprintf(stream, "\"%s\" \n", string); + free(string); + entry_data_list = entry_data_list->next; + } + break; + case MMDB_DATA_TYPE_BYTES: + { + char *hex_string = + bytes_to_hex((uint8_t *)entry_data_list->entry_data.bytes, + entry_data_list->entry_data.data_size); + if (NULL == hex_string) { + *status = MMDB_OUT_OF_MEMORY_ERROR; + return NULL; + } + + print_indentation(stream, indent); + fprintf(stream, "%s \n", hex_string); + free(hex_string); + + entry_data_list = entry_data_list->next; + } + break; + case MMDB_DATA_TYPE_DOUBLE: + print_indentation(stream, indent); + fprintf(stream, "%f \n", + entry_data_list->entry_data.double_value); + entry_data_list = entry_data_list->next; + break; + case MMDB_DATA_TYPE_FLOAT: + print_indentation(stream, indent); + fprintf(stream, "%f \n", + entry_data_list->entry_data.float_value); + entry_data_list = entry_data_list->next; + break; + case MMDB_DATA_TYPE_UINT16: + print_indentation(stream, indent); + fprintf(stream, "%u \n", entry_data_list->entry_data.uint16); + entry_data_list = entry_data_list->next; + break; + case MMDB_DATA_TYPE_UINT32: + print_indentation(stream, indent); + fprintf(stream, "%u \n", entry_data_list->entry_data.uint32); + entry_data_list = entry_data_list->next; + break; + case MMDB_DATA_TYPE_BOOLEAN: + print_indentation(stream, indent); + fprintf(stream, "%s \n", + entry_data_list->entry_data.boolean ? "true" : "false"); + entry_data_list = entry_data_list->next; + break; + case MMDB_DATA_TYPE_UINT64: + print_indentation(stream, indent); + fprintf(stream, "%" PRIu64 " \n", + entry_data_list->entry_data.uint64); + entry_data_list = entry_data_list->next; + break; + case MMDB_DATA_TYPE_UINT128: { /* Error C2360 if hex_string initialization is not inside a block */ + print_indentation(stream, indent); +#if MMDB_UINT128_IS_BYTE_ARRAY + char *hex_string = + bytes_to_hex((uint8_t *)entry_data_list->entry_data.uint128, 16); + fprintf(stream, "0x%s \n", hex_string); + free(hex_string); +#else + uint64_t high = entry_data_list->entry_data.uint128 >> 64; + uint64_t low = (uint64_t)entry_data_list->entry_data.uint128; + fprintf(stream, "0x%016" PRIX64 "%016" PRIX64 " \n", high, + low); +#endif + entry_data_list = entry_data_list->next; + break; + } + case MMDB_DATA_TYPE_INT32: + print_indentation(stream, indent); + fprintf(stream, "%d \n", entry_data_list->entry_data.int32); + entry_data_list = entry_data_list->next; + break; + default: + *status = MMDB_INVALID_DATA_ERROR; + return NULL; + } + + *status = MMDB_SUCCESS; + return entry_data_list; +} + +LOCAL void print_indentation(FILE *stream, int i) +{ + char buffer[1024]; + int size = i >= 1024 ? 1023 : i; + memset(buffer, 32, size); + buffer[size] = '\0'; + fputs(buffer, stream); +} + +LOCAL char *bytes_to_hex(uint8_t *bytes, uint32_t size) +{ + char *hex_string = (char *)malloc((size * 2) + 1); + char *hex_pointer = hex_string; + + for (uint32_t i = 0; i < size; i++) { + sprintf(hex_pointer + (2 * i), "%02X", bytes[i]); + } + + return hex_string; +} + +const char *MMDB_strerror(int error_code) +{ + switch (error_code) { + case MMDB_SUCCESS: + return "Success (not an error)"; + case MMDB_FILE_OPEN_ERROR: + return "Error opening the specified MaxMind DB file"; + case MMDB_CORRUPT_SEARCH_TREE_ERROR: + return "The MaxMind DB file's search tree is corrupt"; + case MMDB_INVALID_METADATA_ERROR: + return "The MaxMind DB file contains invalid metadata"; + case MMDB_IO_ERROR: + return "An attempt to read data from the MaxMind DB file failed"; + case MMDB_OUT_OF_MEMORY_ERROR: + return "A memory allocation call failed"; + case MMDB_UNKNOWN_DATABASE_FORMAT_ERROR: + return + "The MaxMind DB file is in a format this library can't handle (unknown record size or binary format version)"; + case MMDB_INVALID_DATA_ERROR: + return + "The MaxMind DB file's data section contains bad data (unknown data type or corrupt data)"; + case MMDB_INVALID_LOOKUP_PATH_ERROR: + return + "The lookup path contained an invalid value (like a negative integer for an array index)"; + case MMDB_LOOKUP_PATH_DOES_NOT_MATCH_DATA_ERROR: + return + "The lookup path does not match the data (key that doesn't exist, array index bigger than the array, expected array or map where none exists)"; + case MMDB_INVALID_NODE_NUMBER_ERROR: + return + "The MMDB_read_node function was called with a node number that does not exist in the search tree"; + case MMDB_IPV6_LOOKUP_IN_IPV4_DATABASE_ERROR: + return + "You attempted to look up an IPv6 address in an IPv4-only database"; + default: + return "Unknown error code"; + } +} diff --git a/dlls/geoip/GeoIP2/maxminddb.h b/dlls/geoip/GeoIP2/maxminddb.h new file mode 100644 index 00000000..3c3f766a --- /dev/null +++ b/dlls/geoip/GeoIP2/maxminddb.h @@ -0,0 +1,267 @@ +#ifndef MAXMINDDB_H +#define MAXMINDDB_H + +#ifndef _POSIX_C_SOURCE +#define _POSIX_C_SOURCE 200112L +#endif + +#include "maxminddb_config.h" +#include +#include +#include +#include + +#ifdef _WIN32 +#include "stdbool.h" /* Arksnine: Not supported by MSVC */ +#include /* Arkshine: ssize_t replacement */ +typedef SSIZE_T ssize_t; +#include +#include +typedef ADDRESS_FAMILY sa_family_t; +#else +#include +#include +#include +#include +#endif + +const char GeoIPCountryCode[][3] = +{ + "AP", "EU", "AD", "AE", "AF", "AG", "AI", "AL", "AM", "AN", + "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AZ", "BA", "BB", + "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BM", "BN", "BO", + "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", + "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", + "CU", "CV", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", + "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", + "FK", "FM", "FO", "FR", "FX", "GA", "GB", "GD", "GE", "GF", + "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", + "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", + "IE", "IL", "IN", "IO", "IQ", "IR", "IS", "IT", "JM", "JO", + "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", + "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", + "LU", "LV", "LY", "MA", "MC", "MD", "MG", "MH", "MK", "ML", + "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", + "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", + "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", + "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", + "PY", "QA", "RE", "RO", "RU", "RW", "SA", "SB", "SC", "SD", + "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", + "SR", "ST", "SV", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", + "TJ", "TK", "TM", "TN", "TO", "TL", "TR", "TT", "TV", "TW", + "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", + "VG", "VI", "VN", "VU", "WF", "WS", "YE", "YT", "RS", "ZA", + "ZM", "ME", "ZW", "A1", "A2", "O1", "AX", "GG", "IM", "JE", + "BL", "MF" +}; + +const char GeoIPCountryCode3[][4] = +{ + "AP", "EU", "AND", "ARE", "AFG", "ATG", "AIA", "ALB", "ARM", "ANT", + "AGO", "AQ", "ARG", "ASM", "AUT", "AUS", "ABW", "AZE", "BIH", "BRB", + "BGD", "BEL", "BFA", "BGR", "BHR", "BDI", "BEN", "BMU", "BRN", "BOL", + "BRA", "BHS", "BTN", "BV", "BWA", "BLR", "BLZ", "CAN", "CC", "COD", + "CAF", "COG", "CHE", "CIV", "COK", "CHL", "CMR", "CHN", "COL", "CRI", + "CUB", "CPV", "CX", "CYP", "CZE", "DEU", "DJI", "DNK", "DMA", "DOM", + "DZA", "ECU", "EST", "EGY", "ESH", "ERI", "ESP", "ETH", "FIN", "FJI", + "FLK", "FSM", "FRO", "FRA", "FX", "GAB", "GBR", "GRD", "GEO", "GUF", + "GHA", "GIB", "GRL", "GMB", "GIN", "GLP", "GNQ", "GRC", "GS", "GTM", + "GUM", "GNB", "GUY", "HKG", "HM", "HND", "HRV", "HTI", "HUN", "IDN", + "IRL", "ISR", "IND", "IO", "IRQ", "IRN", "ISL", "ITA", "JAM", "JOR", + "JPN", "KEN", "KGZ", "KHM", "KIR", "COM", "KNA", "PRK", "KOR", "KWT", + "CYM", "KAZ", "LAO", "LBN", "LCA", "LIE", "LKA", "LBR", "LSO", "LTU", + "LUX", "LVA", "LBY", "MAR", "MCO", "MDA", "MDG", "MHL", "MKD", "MLI", + "MMR", "MNG", "MAC", "MNP", "MTQ", "MRT", "MSR", "MLT", "MUS", "MDV", + "MWI", "MEX", "MYS", "MOZ", "NAM", "NCL", "NER", "NFK", "NGA", "NIC", + "NLD", "NOR", "NPL", "NRU", "NIU", "NZL", "OMN", "PAN", "PER", "PYF", + "PNG", "PHL", "PAK", "POL", "SPM", "PCN", "PRI", "PSE", "PRT", "PLW", + "PRY", "QAT", "REU", "ROU", "RUS", "RWA", "SAU", "SLB", "SYC", "SDN", + "SWE", "SGP", "SHN", "SVN", "SJM", "SVK", "SLE", "SMR", "SEN", "SOM", + "SUR", "STP", "SLV", "SYR", "SWZ", "TCA", "TCD", "TF", "TGO", "THA", + "TJK", "TKL", "TKM", "TUN", "TON", "TLS", "TUR", "TTO", "TUV", "TWN", + "TZA", "UKR", "UGA", "UM", "USA", "URY", "UZB", "VAT", "VCT", "VEN", + "VGB", "VIR", "VNM", "VUT", "WLF", "WSM", "YEM", "YT", "SRB", "ZAF", + "ZMB", "MNE", "ZWE", "A1", "A2", "O1", "ALA", "GGY", "IMN", "JEY", + "BLM", "MAF" +}; + +#define MMDB_DATA_TYPE_EXTENDED (0) +#define MMDB_DATA_TYPE_POINTER (1) +#define MMDB_DATA_TYPE_UTF8_STRING (2) +#define MMDB_DATA_TYPE_DOUBLE (3) +#define MMDB_DATA_TYPE_BYTES (4) +#define MMDB_DATA_TYPE_UINT16 (5) +#define MMDB_DATA_TYPE_UINT32 (6) +#define MMDB_DATA_TYPE_MAP (7) +#define MMDB_DATA_TYPE_INT32 (8) +#define MMDB_DATA_TYPE_UINT64 (9) +#define MMDB_DATA_TYPE_UINT128 (10) +#define MMDB_DATA_TYPE_ARRAY (11) +#define MMDB_DATA_TYPE_CONTAINER (12) +#define MMDB_DATA_TYPE_END_MARKER (13) +#define MMDB_DATA_TYPE_BOOLEAN (14) +#define MMDB_DATA_TYPE_FLOAT (15) + +/* GEOIPDB flags */ +#define MMDB_MODE_MMAP (1) +#define MMDB_MODE_MASK (7) + +/* GEOIPDB err codes */ +#define MMDB_SUCCESS (0) +#define MMDB_FILE_OPEN_ERROR (1) +#define MMDB_CORRUPT_SEARCH_TREE_ERROR (2) +#define MMDB_INVALID_METADATA_ERROR (3) +#define MMDB_IO_ERROR (4) +#define MMDB_OUT_OF_MEMORY_ERROR (5) +#define MMDB_UNKNOWN_DATABASE_FORMAT_ERROR (6) +#define MMDB_INVALID_DATA_ERROR (7) +#define MMDB_INVALID_LOOKUP_PATH_ERROR (8) +#define MMDB_LOOKUP_PATH_DOES_NOT_MATCH_DATA_ERROR (9) +#define MMDB_INVALID_NODE_NUMBER_ERROR (10) +#define MMDB_IPV6_LOOKUP_IN_IPV4_DATABASE_ERROR (11) + +#if !(MMDB_UINT128_IS_BYTE_ARRAY) +#if MMDB_UINT128_USING_MODE +typedef unsigned int mmdb_uint128_t __attribute__ ((__mode__(TI))); +#else +typedef unsigned __int128 mmdb_uint128_t; +#endif +#endif + +/* This is a pointer into the data section for a given IP address lookup */ +typedef struct MMDB_entry_s { + struct MMDB_s *mmdb; + uint32_t offset; +} MMDB_entry_s; + +typedef struct MMDB_lookup_result_s { + bool found_entry; + MMDB_entry_s entry; + uint16_t netmask; +} MMDB_lookup_result_s; + +typedef struct MMDB_entry_data_s { + bool has_data; + union { + uint32_t pointer; + const char *utf8_string; + double double_value; + const uint8_t *bytes; + uint16_t uint16; + uint32_t uint32; + int32_t int32; + uint64_t uint64; +#if MMDB_UINT128_IS_BYTE_ARRAY + uint8_t uint128[16]; +#else + mmdb_uint128_t uint128; +#endif + bool boolean; + float float_value; + }; + /* This is a 0 if a given entry cannot be found. This can only happen + * when a call to MMDB_(v)get_value() asks for hash keys or array + * indices that don't exist. */ + uint32_t offset; + /* This is the next entry in the data section, but it's really only + * relevant for entries that part of a larger map or array + * struct. There's no good reason for an end user to look at this + * directly. */ + uint32_t offset_to_next; + /* This is only valid for strings, utf8_strings or binary data */ + uint32_t data_size; + /* This is an MMDB_DATA_TYPE_* constant */ + uint32_t type; +} MMDB_entry_data_s; + +/* This is the return type when someone asks for all the entry data in a map or array */ +typedef struct MMDB_entry_data_list_s { + MMDB_entry_data_s entry_data; + struct MMDB_entry_data_list_s *next; +} MMDB_entry_data_list_s; + +typedef struct MMDB_description_s { + const char *language; + const char *description; +} MMDB_description_s; + +typedef struct MMDB_metadata_s { + uint32_t node_count; + uint16_t record_size; + uint16_t ip_version; + const char *database_type; + struct { + size_t count; + const char **names; + } languages; + uint16_t binary_format_major_version; + uint16_t binary_format_minor_version; + uint64_t build_epoch; + struct { + size_t count; + MMDB_description_s **descriptions; + } description; +} MMDB_metadata_s; + +typedef struct MMDB_ipv4_start_node_s { + uint16_t netmask; + uint32_t node_value; +} MMDB_ipv4_start_node_s; + +typedef struct MMDB_s { + uint32_t flags; + const char *filename; + ssize_t file_size; + const uint8_t *file_content; + const uint8_t *data_section; + uint32_t data_section_size; + const uint8_t *metadata_section; + uint32_t metadata_section_size; + uint16_t full_record_byte_size; + uint16_t depth; + MMDB_ipv4_start_node_s ipv4_start_node; + MMDB_metadata_s metadata; +} MMDB_s; + +typedef struct MMDB_search_node_s { + uint64_t left_record; + uint64_t right_record; +} MMDB_search_node_s; + + /* *INDENT-OFF* */ + /* --prototypes automatically generated by dev-bin/regen-prototypes.pl - don't remove this comment */ + extern int MMDB_open(const char *const filename, uint32_t flags, MMDB_s *const mmdb); + extern MMDB_lookup_result_s MMDB_lookup_string(MMDB_s *const mmdb, + const char *const ipstr, + int *const gai_error, + int *const mmdb_error); + extern MMDB_lookup_result_s MMDB_lookup_sockaddr( + MMDB_s *const mmdb, + const struct sockaddr *const sockaddr, + int *const mmdb_error); + extern int MMDB_read_node(MMDB_s *const mmdb, uint32_t node_number, + MMDB_search_node_s *const node); + extern int MMDB_get_value(MMDB_entry_s *const start, + MMDB_entry_data_s *const entry_data, + ...); + extern int MMDB_vget_value(MMDB_entry_s *const start, + MMDB_entry_data_s *const entry_data, + va_list va_path); + extern int MMDB_aget_value(MMDB_entry_s *const start, + MMDB_entry_data_s *const entry_data, + const char *const *const path); + extern int MMDB_get_metadata_as_entry_data_list( + MMDB_s *const mmdb, MMDB_entry_data_list_s **const entry_data_list); + extern int MMDB_get_entry_data_list( + MMDB_entry_s *start, MMDB_entry_data_list_s **const entry_data_list); + extern void MMDB_free_entry_data_list(MMDB_entry_data_list_s *const entry_data_list); + extern void MMDB_close(MMDB_s *const mmdb); + extern const char *MMDB_lib_version(void); + extern int MMDB_dump_entry_data_list(FILE *const stream, + MMDB_entry_data_list_s *const entry_data_list, + int indent); + extern const char *MMDB_strerror(int error_code); + /* --prototypes end - don't remove this comment-- */ + /* *INDENT-ON* */ + +#endif /* MAXMINDDB_H */ diff --git a/dlls/geoip/GeoIP2/maxminddb_config.h b/dlls/geoip/GeoIP2/maxminddb_config.h new file mode 100644 index 00000000..1a54c0e1 --- /dev/null +++ b/dlls/geoip/GeoIP2/maxminddb_config.h @@ -0,0 +1,16 @@ +#ifndef MAXMINDDB_CONFIG_H +#define MAXMINDDB_CONFIG_H + +#define PACKAGE_VERSION "0.5.6" // Arkshine: added manually. + +#ifndef MMDB_UINT128_USING_MODE +/* Define as 1 if we we use unsigned int __atribute__ ((__mode__(TI))) for uint128 values */ +#define MMDB_UINT128_USING_MODE 0 +#endif + +#ifndef MMDB_UINT128_IS_BYTE_ARRAY +/* Define as 1 if we don't have an unsigned __int128 type */ +#define MMDB_UINT128_IS_BYTE_ARRAY 1 +#endif + +#endif /* MAXMINDDB_CONFIG_H */ diff --git a/dlls/geoip/GeoIP2/stdbool.h b/dlls/geoip/GeoIP2/stdbool.h new file mode 100644 index 00000000..8e7b4044 --- /dev/null +++ b/dlls/geoip/GeoIP2/stdbool.h @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2000 Jeroen Ruigrok van der Werven + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD: src/include/stdbool.h,v 1.6 2002/08/16 07:33:14 alfred Exp $ + */ + +#ifndef _STDBOOL_H_ +#define _STDBOOL_H_ + +#define __bool_true_false_are_defined 1 + +#ifndef __cplusplus + +#define false 0 +#define true 1 + +#define bool _Bool +#if __STDC_VERSION__ < 199901L && __GNUC__ < 3 +typedef int _Bool; +#endif + +#endif /* !__cplusplus */ + +#endif /* !_STDBOOL_H_ */ \ No newline at end of file diff --git a/dlls/geoip/GeoLite2-Country.mmdb b/dlls/geoip/GeoLite2-Country.mmdb new file mode 100644 index 00000000..68de2d54 Binary files /dev/null and b/dlls/geoip/GeoLite2-Country.mmdb differ diff --git a/dlls/geoip/Makefile b/dlls/geoip/Makefile index fce54680..01b27512 100755 --- a/dlls/geoip/Makefile +++ b/dlls/geoip/Makefile @@ -14,7 +14,7 @@ MM_ROOT = ../../../metamod/metamod PROJECT = geoip -OBJECTS = sdk/amxxmodule.cpp GeoIP.c geoip_amxx.cpp +OBJECTS = sdk/amxxmodule.cpp GeoIP2/maxminddb.cpp geoip_main.cpp geoip_natives.cpp geoip_util.cpp ############################################## ### CONFIGURE ANY OTHER FLAGS/OPTIONS HERE ### diff --git a/dlls/geoip/geoip_amxx.cpp b/dlls/geoip/geoip_amxx.cpp deleted file mode 100755 index b545128d..00000000 --- a/dlls/geoip/geoip_amxx.cpp +++ /dev/null @@ -1,102 +0,0 @@ -#include -#include "geoip_amxx.h" - -GeoIP *gi = NULL; - -inline void StripPort(char *ip) -{ - char *tmp = strchr(ip, ':'); - if (!tmp) - return; - *tmp = '\0'; -} - -static cell AMX_NATIVE_CALL amx_geoip_code2(AMX *amx, cell *params) -{ - int len = 0; - char *ip = MF_GetAmxString(amx, params[1], 0, &len); - StripPort(ip); - const char *ccode = GeoIP_country_code_by_addr(gi, ip); - return MF_SetAmxString(amx, params[2], ccode?ccode:"error", 3); -} - -static cell AMX_NATIVE_CALL amx_geoip_code3(AMX *amx, cell *params) -{ - int len = 0; - char *ip = MF_GetAmxString(amx, params[1], 0, &len); - StripPort(ip); - const char *ccode = GeoIP_country_code3_by_addr(gi, ip); - return MF_SetAmxString(amx, params[2], ccode?ccode:"error", 4); -} -static cell AMX_NATIVE_CALL amx_geoip_code2_ex(AMX *amx, cell *params) -{ - int len = 0; - char *ip = MF_GetAmxString(amx, params[1], 0, &len); - StripPort(ip); - const char *ccode = GeoIP_country_code_by_addr(gi, ip); - - if (ccode == NULL) - { - return 0; - } - - MF_SetAmxString(amx, params[2], ccode, 2); - - return 1; -} - -static cell AMX_NATIVE_CALL amx_geoip_code3_ex(AMX *amx, cell *params) -{ - int len = 0; - char *ip = MF_GetAmxString(amx, params[1], 0, &len); - StripPort(ip); - const char *ccode = GeoIP_country_code3_by_addr(gi, ip); - - if (ccode == NULL) - { - return 0; - } - - MF_SetAmxString(amx, params[2], ccode, 3); - - return 1; -} - -static cell AMX_NATIVE_CALL amx_geoip_country(AMX *amx, cell *params) -{ - int len = 0; - char *ip = MF_GetAmxString(amx, params[1], 0, &len); - StripPort(ip); - const char *ccode = GeoIP_country_name_by_addr(gi, ip); - return MF_SetAmxString(amx, params[2], ccode?ccode:"error", params[3]); -} - -void OnAmxxAttach() -{ - char *path = MF_BuildPathname("%s/GeoIP.dat",MF_GetLocalInfo("amxx_datadir", "addons/amxmodx/data")); - gi = GeoIP_open(path, GEOIP_MEMORY_CACHE); - if (gi == NULL) { - MF_Log("Failed to instantiate GeoIP!"); - return; - } - char *db_info = GeoIP_database_info(gi); - MF_Log("Database info: %s", db_info); - MF_AddNatives(geoip_natives); -} - -void OnAmxxDetach() -{ - GeoIP_delete(gi); - gi = NULL; -} - -AMX_NATIVE_INFO geoip_natives[] = { - {"geoip_code2", amx_geoip_code2}, - {"geoip_code3", amx_geoip_code3}, - - {"geoip_code2_ex", amx_geoip_code2_ex}, - {"geoip_code3_ex", amx_geoip_code3_ex}, - - {"geoip_country", amx_geoip_country}, - {NULL, NULL}, -}; diff --git a/dlls/geoip/geoip_amxx.h b/dlls/geoip/geoip_amxx.h index 6f2b8688..2e5ef298 100755 --- a/dlls/geoip/geoip_amxx.h +++ b/dlls/geoip/geoip_amxx.h @@ -1,10 +1,25 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// GeoIP Module +// + #ifndef _INCLUDE_GEOIPAMXX_H #define _INCLUDE_GEOIPAMXX_H -#define GEOIPDATADIR "" - +#include "GeoIP2/maxminddb.h" #include "amxxmodule.h" -#include "GeoIP.h" + +#if defined(WIN32) + #define snprintf _snprintf +#endif extern AMX_NATIVE_INFO geoip_natives[]; diff --git a/dlls/geoip/geoip_main.cpp b/dlls/geoip/geoip_main.cpp new file mode 100644 index 00000000..61344c22 --- /dev/null +++ b/dlls/geoip/geoip_main.cpp @@ -0,0 +1,232 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// GeoIP Module +// + +#include "geoip_main.h" +#include "geoip_natives.h" +#include "geoip_util.h" +#include + +MMDB_s HandleDB; +ke::Vector LangList; + +void OnAmxxAttach() +{ + if (loadDatabase()) + { + MF_AddNatives(GeoipNatives); + } + + REG_SVR_COMMAND("geoip", OnGeoipCommand); +} + +void OnAmxxDetach() +{ + MMDB_close(&HandleDB); + + LangList.clear(); +} + +void OnGeoipCommand() +{ + const char *cmd = CMD_ARGV(1); + + if (!strcmp(cmd, "version")) + { + if (!HandleDB.filename) + { + printf("\n Database is not loaded.\n"); + return; + } + + const char *meta_dump = "\n" + " Database metadata\n" + " Node count: %i\n" + " Record size: %i bits\n" + " IP version: IPv%i\n" + " Binary format: %i.%i\n" + " Build epoch: %llu (%s)\n" + " Type: %s\n" + " Languages: "; + + char date[40]; + strftime(date, sizeof(date), "%Y-%m-%d %H:%M:%S UTC", gmtime((const time_t *)&HandleDB.metadata.build_epoch)); + + fprintf(stdout, meta_dump, + HandleDB.metadata.node_count, + HandleDB.metadata.record_size, + HandleDB.metadata.ip_version, + HandleDB.metadata.binary_format_major_version, + HandleDB.metadata.binary_format_minor_version, + HandleDB.metadata.build_epoch, + date, + HandleDB.metadata.database_type); + + for (size_t i = 0; i < HandleDB.metadata.languages.count; ++i) + { + fprintf(stdout, "%s", HandleDB.metadata.languages.names[i]); + + if (i language, + HandleDB.metadata.description.descriptions[i]->description); + } + fprintf(stdout, "\n"); + } + else if (!strcmp(cmd, "dump")) + { + if (!HandleDB.filename) + { + printf("\n Database is not loaded.\n\n"); + return; + } + + int num_args = CMD_ARGC(); + + if (num_args < 3) + { + printf("\n An IP address must be provided.\n\n"); + return; + } + + char *ip = stripPort((char *)CMD_ARGV(2)); + + int gai_error = 0; + int mmdb_error = 0; + + MMDB_lookup_result_s result = MMDB_lookup_string(&HandleDB, ip, &gai_error, &mmdb_error); + + if (gai_error != 0 || mmdb_error != MMDB_SUCCESS || !result.found_entry) + { + printf("\n Either look up failed or no found result.\n\n"); + return; + } + + MMDB_entry_data_list_s *entry_data_list = NULL; + int status = -1; + + if ((status = MMDB_get_entry_data_list(&result.entry, &entry_data_list)) != MMDB_SUCCESS || entry_data_list == NULL) + { + printf("\n Could not retrieve data list - %s.\n\n", MMDB_strerror(status)); + return; + } + + const char *file = NULL; + FILE *fp = NULL; + + if (num_args > 3) + { + file = CMD_ARGV(3); + fp = fopen(MF_BuildPathname("%s", file), "w"); + } + + if (!fp) + { + file = NULL; + fp = stdout; + } + + fprintf(fp, "\n"); + MMDB_dump_entry_data_list(fp, entry_data_list, 2); + fprintf(fp, "\n"); + + if (file) + { + fclose(fp); + } + + MMDB_free_entry_data_list(entry_data_list); + } + else + { + printf("\n"); + printf(" Usage: geoip [argument]\n"); + printf(" Commands:\n"); + printf(" version - display geoip database metadata\n"); + printf(" dump [output file] - dump all data from an IP address formatted in a JSON-ish fashion.\n"); + printf(" An output file is mod-based and if not provided, it will print in the console.\n"); + printf("\n"); + } +} + +bool loadDatabase() +{ + if (HandleDB.filename) // Already loaded. + { + return true; + } + + const char *databases[] = + { + "City", + "Country" // Is the default shipped database with AMXX. + }; + + const char *modName = MF_GetModname(); + const char *dataDir = MF_GetLocalInfo("amxx_datadir", "addons/amxmodx/data"); + + char file[255]; + int status = -1; + + for (size_t i = 0; i < ARRAYSIZE(databases); ++i) + { + // MF_BuildPathname not used because backslash + // makes CreateFileMapping failing under windows. + + snprintf(file, sizeof(file)-1, "%s/%s/GeoLite2-%s.mmdb", modName, dataDir, databases[i]); + + status = MMDB_open(file, MMDB_MODE_MMAP, &HandleDB); + + if (status == MMDB_SUCCESS) + { + break; + } + else if (status != MMDB_FILE_OPEN_ERROR) + { + MF_Log("Could not open %s - %s", file, MMDB_strerror(status)); + + if (status == MMDB_IO_ERROR) + { + MF_Log(" IO error: %s", strerror(errno)); + } + } + } + + if (status != MMDB_SUCCESS) + { + MF_Log("Could not find GeoIP2 databases. Disabled natives."); + return false; + } + + MF_Log("Database info: %s %i.%i", + HandleDB.metadata.description.descriptions[0]->description, + HandleDB.metadata.binary_format_major_version, + HandleDB.metadata.binary_format_minor_version); + + // Retrieve supported languages. + for (size_t i = 0; i < HandleDB.metadata.languages.count; i++) + { + LangList.append(ke::AString(HandleDB.metadata.languages.names[i])); + } + + return true; +} diff --git a/dlls/geoip/geoip_main.h b/dlls/geoip/geoip_main.h new file mode 100644 index 00000000..6d9f58fb --- /dev/null +++ b/dlls/geoip/geoip_main.h @@ -0,0 +1,23 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// GeoIP Module +// + +#ifndef _INCLUDE_GEOIPMAIN_H +#define _INCLUDE_GEOIPMAIN_H + +#include "GeoIP2/maxminddb.h" +#include "amxxmodule.h" + +bool loadDatabase(); +void OnGeoipCommand(); + +#endif // _INCLUDE_GEOIPMAIN_H \ No newline at end of file diff --git a/dlls/geoip/geoip_natives.cpp b/dlls/geoip/geoip_natives.cpp new file mode 100755 index 00000000..24785aa3 --- /dev/null +++ b/dlls/geoip/geoip_natives.cpp @@ -0,0 +1,399 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// GeoIP Module +// + +#include "geoip_main.h" +#include "geoip_natives.h" +#include "geoip_util.h" + +#include +#include + +// native geoip_code2(const ip[], ccode[3]); +// Deprecated. +static cell AMX_NATIVE_CALL amx_geoip_code2(AMX *amx, cell *params) +{ + int length; + char *ip = stripPort(MF_GetAmxString(amx, params[1], 0, &length)); + + const char *path[] = { "country", "iso_code", NULL }; + const char *code = lookupString(ip, path); + + return MF_SetAmxString(amx, params[2], code ? code : "error", 3); +} + +// native geoip_code3(const ip[], result[4]); +// Deprecated. +static cell AMX_NATIVE_CALL amx_geoip_code3(AMX *amx, cell *params) +{ + int length; + char *ip = stripPort(MF_GetAmxString(amx, params[1], 0, &length)); + + const char *path[] = { "country", "iso_code", NULL }; + const char *code = lookupString(ip, path); + + for (size_t i = 0; i < ARRAYSIZE(GeoIPCountryCode); ++i) + { + if (!strncmp(code, GeoIPCountryCode[i], 2)) + { + code = GeoIPCountryCode3[i]; + break; + } + } + + return MF_SetAmxString(amx, params[2], code ? code : "error", 4); +} + +// native bool:geoip_code2_ex(const ip[], result[3]); +static cell AMX_NATIVE_CALL amx_geoip_code2_ex(AMX *amx, cell *params) +{ + int length; + char *ip = stripPort(MF_GetAmxString(amx, params[1], 0, &length)); + + const char *path[] = { "country", "iso_code", NULL }; + const char *code = lookupString(ip, path); + + if (!code) + { + return 0; + } + + MF_SetAmxString(amx, params[2], code, 2); + + return 1; +} + +// native bool:geoip_code3_ex(const ip[], result[4]); +static cell AMX_NATIVE_CALL amx_geoip_code3_ex(AMX *amx, cell *params) +{ + int length; + char *ip = stripPort(MF_GetAmxString(amx, params[1], 0, &length)); + + const char *path[] = { "country", "iso_code", NULL }; + const char *code = lookupString(ip, path, &length); + + if (!code) + { + return 0; + } + + for (size_t i = 0; i < ARRAYSIZE(GeoIPCountryCode); ++i) + { + if (!strncmp(code, GeoIPCountryCode[i], 2)) + { + code = GeoIPCountryCode3[i]; + break; + } + } + + MF_SetAmxString(amx, params[2], code, 3); + + return 1; +} + +// native geoip_country(const ip[], result[], len, id = -1); +static cell AMX_NATIVE_CALL amx_geoip_country(AMX *amx, cell *params) +{ + int length; + char *ip = stripPort(MF_GetAmxString(amx, params[1], 0, &length)); + + const char *path[] = { "country", "names", getLang(params[4]), NULL }; + const char *country = lookupString(ip, path, &length); + + if (!country) + { + return 0; + } + + return MF_SetAmxStringUTF8Char(amx, params[2], country, length, params[3] + 1); +} + +// native geoip_city(const ip[], result[], len, id = -1); +static cell AMX_NATIVE_CALL amx_geoip_city(AMX *amx, cell *params) +{ + int length; + char *ip = stripPort(MF_GetAmxString(amx, params[1], 0, &length)); + + const char *path[] = { "city", "names", getLang(params[4]), NULL }; + const char *city = lookupString(ip, path, &length); + + return MF_SetAmxStringUTF8Char(amx, params[2], city ? city : "", length, params[3] + 1); +} + +// native geoip_region_code(const ip[], result[], len); +static cell AMX_NATIVE_CALL amx_geoip_region_code(AMX *amx, cell *params) +{ + int length; + int finalLength = 0; + char code[12]; // This should be largely enough to hold xx-yyyy and more if needed. + + char *ip = stripPort(MF_GetAmxString(amx, params[1], 0, &length)); + + const char *pathCountry[] = { "country", "iso_code", NULL }; + const char *countryCode = lookupString(ip, pathCountry, &length); + + if (countryCode) + { + finalLength = length + 1; // + 1 for dash. + snprintf(code, finalLength + 1, "%s-", countryCode); // + EOS. + + const char *pathRegion[] = { "subdivisions", "0", "iso_code", NULL }; // First result. + const char *regionCode = lookupString(ip, pathRegion, &length); + + if (regionCode) + { + finalLength += length; + strncat(code, regionCode, length); + } + else + { + finalLength = 0; + } + } + + return MF_SetAmxString(amx, params[2], finalLength ? code : "", ke::Min(finalLength, params[3])); +} + +// native geoip_region_name(const ip[], result[], len, id = -1); +static cell AMX_NATIVE_CALL amx_geoip_region_name(AMX *amx, cell *params) +{ + int length; + char *ip = stripPort(MF_GetAmxString(amx, params[1], 0, &length)); + + const char *path[] = { "subdivisions", "0", "names", getLang(params[4]), NULL }; // First result. + const char *region = lookupString(ip, path, &length); + + return MF_SetAmxStringUTF8Char(amx, params[2], region ? region : "", length, params[3] + 1); +} + +// native geoip_timezone(const ip[], result[], len); +static cell AMX_NATIVE_CALL amx_geoip_timezone(AMX *amx, cell *params) +{ + int length; + char *ip = stripPort(MF_GetAmxString(amx, params[1], 0, &length)); + + const char *path[] = { "location", "time_zone", NULL }; + const char *timezone = lookupString(ip, path, &length); + + return MF_SetAmxString(amx, params[2], timezone ? timezone : "", ke::Min(length, params[3])); +} + +// native geoip_latitude(const ip[]); +static cell AMX_NATIVE_CALL amx_geoip_latitude(AMX *amx, cell *params) +{ + int length; + char *ip = stripPort(MF_GetAmxString(amx, params[1], 0, &length)); + + const char *path[] = { "location", "latitude", NULL }; + double latitude = lookupDouble(ip, path); + + return amx_ftoc(latitude); +} + +// native geoip_longitude(const ip[]); +static cell AMX_NATIVE_CALL amx_geoip_longitude(AMX *amx, cell *params) +{ + int length; + char *ip = stripPort(MF_GetAmxString(amx, params[1], 0, &length)); + + const char *path[] = { "location", "longitude", NULL }; + double longitude = lookupDouble(ip, path); + + return amx_ftoc(longitude); +} + +// native Float:geoip_distance(Float:lat1, Float:lon1, Float:lat2, Float:lon2, system = SYSTEM_METRIC); +static cell AMX_NATIVE_CALL amx_geoip_distance(AMX *amx, cell *params) +{ + float earthRadius = params[5] ? 3958.0 : 6370.997; // miles / km + + float lat1 = amx_ctof(params[1]) * (M_PI / 180); + float lon1 = amx_ctof(params[2]) * (M_PI / 180); + float lat2 = amx_ctof(params[3]) * (M_PI / 180); + float lon2 = amx_ctof(params[4]) * (M_PI / 180); + + return amx_ftoc(earthRadius * acos(sin(lat1) * sin(lat2) + cos(lat1) * cos(lat2) * cos(lon2 - lon1))); +} + +// native Continent:geoip_continent_code(const ip[], result[3] = ""); +static cell AMX_NATIVE_CALL amx_geoip_continent_code(AMX *amx, cell *params) +{ + int length; + char *ip = stripPort(MF_GetAmxString(amx, params[1], 0, &length)); + + const char *path[] = { "continent", "code", NULL }; + const char *code = lookupString(ip, path, &length); + + MF_SetAmxString(amx, params[2], code ? code : "", code ? 2 : 0); + + return getContinentId(code); +} + +// native geoip_continent_name(const ip[], result[], len, id = -1); +static cell AMX_NATIVE_CALL amx_geoip_continent_name(AMX *amx, cell *params) +{ + int length; + char *ip = stripPort(MF_GetAmxString(amx, params[1], 0, &length)); + + const char *path[] = { "continent", "names", getLang(params[4]), NULL }; + const char *continent = lookupString(ip, path, &length); + + return MF_SetAmxStringUTF8Char(amx, params[2], continent ? continent : "", length, params[3] + 1); +} + + +AMX_NATIVE_INFO GeoipNatives[] = +{ + { "geoip_code2", amx_geoip_code2 }, + { "geoip_code3", amx_geoip_code3 }, + + { "geoip_code2_ex", amx_geoip_code2_ex }, + { "geoip_code3_ex", amx_geoip_code3_ex }, + + { "geoip_country", amx_geoip_country }, + { "geoip_city" , amx_geoip_city }, + + { "geoip_region_code", amx_geoip_region_code }, + { "geoip_region_name", amx_geoip_region_name }, + + { "geoip_timezone" , amx_geoip_timezone }, + { "geoip_latitude" , amx_geoip_latitude }, + { "geoip_longitude", amx_geoip_longitude }, + { "geoip_distance" , amx_geoip_distance }, + + { "geoip_continent_code", amx_geoip_continent_code }, + { "geoip_continent_name", amx_geoip_continent_name }, + + { NULL, NULL }, +}; + + +/** +* GEOIP2 DATA EXAMPLE: +* +* { +* "city": { +* "confidence": 25, +* "geoname_id": 54321, +* "names": { +* "de": "Los Angeles", +* "en": "Los Angeles", +* "es": "Los Ãngeles", +* "fr": "Los Angeles", +* "ja": "ロサンゼルス市", +* "pt-BR": "Los Angeles", +* "ru": "ЛоÑ-ÐнджелеÑ", +* "zh-CN": "æ´›æ‰çŸ¶" +* } +* }, +* "continent": { +* "code": "NA", +* "geoname_id": 123456, +* "names": { +* "de": "Nordamerika", +* "en": "North America", +* "es": "América del Norte", +* "fr": "Amérique du Nord", +* "ja": "北アメリカ", +* "pt-BR": "América do Norte", +* "ru": "Ð¡ÐµÐ²ÐµÑ€Ð½Ð°Ñ Ðмерика", +* "zh-CN": "北美洲" +* +* } +* }, +* "country": { +* "confidence": 75, +* "geoname_id": "6252001", +* "iso_code": "US", +* "names": { +* "de": "USA", +* "en": "United States", +* "es": "Estados Unidos", +* "fr": "États-Unis", +* "ja": "アメリカåˆè¡†å›½", +* "pt-BR": "Estados Unidos", +* "ru": "СШÐ", +* "zh-CN": "美国" +* } +* }, +* "location": { +* "accuracy_radius": 20, +* "latitude": 37.6293, +* "longitude": -122.1163, +* "metro_code": 807, +* "time_zone": "America/Los_Angeles" +* }, +* "postal": { +* "code": "90001", +* "confidence": 10 +* }, +* "registered_country": { +* "geoname_id": "6252001", +* "iso_code": "US", +* "names": { +* "de": "USA", +* "en": "United States", +* "es": "Estados Unidos", +* "fr": "États-Unis", +* "ja": "アメリカåˆè¡†å›½", +* "pt-BR": "Estados Unidos", +* "ru": "СШÐ", +* "zh-CN": "美国" +* } +* }, +* "represented_country": { +* "geoname_id": "6252001", +* "iso_code": "US", +* "names": { +* "de": "USA", +* "en": "United States", +* "es": "Estados Unidos", +* "fr": "États-Unis", +* "ja": "アメリカåˆè¡†å›½", +* "pt-BR": "Estados Unidos", +* "ru": "СШÐ", +* "zh-CN": "美国" +* }, +* "type": "military" +* }, +* "subdivisions": [ +* { +* "confidence": 50, +* "geoname_id": 5332921, +* "iso_code": "CA", +* "names": { +* "de": "Kalifornien", +* "en": "California", +* "es": "California", +* "fr": "Californie", +* "ja": "カリフォルニア", +* "ru": "КалифорниÑ", +* "zh-CN": "加州" +* } +* } +* ], +* "traits": { +* "autonomous_system_number": "1239", +* "autonomous_system_organization": "Linkem IR WiMax Network", +* "domain": "example.com", +* "is_anonymous_proxy": true, +* "is_transparent_proxy": true, +* "isp": "Linkem spa", +* "ip_address": "1.2.3.4", +* "organization": "Linkem IR WiMax Network", +* "user_type": "traveler", +* }, +* "maxmind": { +* "queries_remaining": "54321" +* } +* } +*/ diff --git a/dlls/geoip/geoip_natives.h b/dlls/geoip/geoip_natives.h new file mode 100644 index 00000000..06f6d216 --- /dev/null +++ b/dlls/geoip/geoip_natives.h @@ -0,0 +1,24 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// GeoIP Module +// + +#ifndef _INCLUDE_GEOIPNATIVES_H +#define _INCLUDE_GEOIPNATIVES_H + +#include +#include + +extern MMDB_s HandleDB; +extern ke::Vector LangList; +extern AMX_NATIVE_INFO GeoipNatives[]; + +#endif // _INCLUDE_GEOIPNATIVES_H diff --git a/dlls/geoip/geoip_util.cpp b/dlls/geoip/geoip_util.cpp new file mode 100644 index 00000000..52b50b22 --- /dev/null +++ b/dlls/geoip/geoip_util.cpp @@ -0,0 +1,215 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// GeoIP Module +// + +#include "geoip_util.h" +#include "geoip_natives.h" + +char *stripPort(char *ip) +{ + char *tmp = strchr(ip, ':'); + + if (tmp) + { + *tmp = '\0'; + } + + return ip; +} + +const char* stristr(const char* str, const char* substr) +{ + register char *needle = (char *)substr; + register char *prevloc = (char *)str; + register char *haystack = (char *)str; + + while (*haystack) + { + if (tolower(*haystack) == tolower(*needle)) + { + haystack++; + + if (!*++needle) + { + return prevloc; + } + } + else + { + haystack = ++prevloc; + needle = (char *)substr; + } + } + + return NULL; +} + +bool lookupByIp(const char *ip, const char **path, MMDB_entry_data_s *result) +{ + int gai_error = 0, mmdb_error = 0; + MMDB_lookup_result_s lookup = MMDB_lookup_string(&HandleDB, ip, &gai_error, &mmdb_error); + + if (gai_error != 0 || mmdb_error != MMDB_SUCCESS || !lookup.found_entry) + { + return false; + } + + MMDB_entry_data_s entry_data; + MMDB_aget_value(&lookup.entry, &entry_data, path); + + if (!entry_data.has_data) + { + size_t i = 0; + + // Dirty fall back to default language ("en") in case provided user's language is not localized. + + // Searh "names" position. + while (strcmp(path[i++], "names")); + + // No localized entry or we use already default language. + if (!*path[i] || !strcmp(path[i], "en")) + { + return false; + } + + // Overwrite user's language. + path[i] = "en"; + + // Try again. + gai_error = mmdb_error = 0; + MMDB_aget_value(&lookup.entry, &entry_data, path); + + if (!entry_data.has_data) + { + return false; + } + } + + *result = entry_data; + + return true; +} + +const char *lookupString(const char *ip, const char **path, int *length) +{ + static char buffer[256]; // This should be large enough for long name in UTF-8. + MMDB_entry_data_s result; + + if (!lookupByIp(ip, path, &result)) + { + return NULL; + } + + // Let's avoid a crash in case we go over the buffer size. + size_t maxLength = ke::Min((size_t)result.data_size, sizeof(buffer)-1); + + // Strings from database are not null terminated. + memcpy(buffer, result.utf8_string, maxLength); + buffer[result.data_size] = '\0'; + + if (length) + { + *length = maxLength; + } + + return buffer; +} + +double lookupDouble(const char *ip, const char **path) +{ + MMDB_entry_data_s result; + + if (!lookupByIp(ip, path, &result)) + { + return 0; + } + + return result.double_value; +} + +int getContinentId(const char *code) +{ + #define CONTINENT_UNKNOWN 0 + #define CONTINENT_AFRICA 1 + #define CONTINENT_ANTARCTICA 2 + #define CONTINENT_ASIA 3 + #define CONTINENT_EUROPE 4 + #define CONTINENT_NORTH_AMERICA 5 + #define CONTINENT_OCEANIA 6 + #define CONTINENT_SOUTH_AMERICA 7 + + int index = CONTINENT_UNKNOWN; + + if (code) + { + switch (code[0]) + { + case 'A': + { + switch (code[1]) + { + case 'F': index = CONTINENT_AFRICA; break; + case 'N': index = CONTINENT_ANTARCTICA; break; + case 'S': index = CONTINENT_ASIA; break; + } + } + case 'E': index = CONTINENT_EUROPE; break; + case 'O': index = CONTINENT_OCEANIA; break; + case 'N': index = CONTINENT_NORTH_AMERICA; break; + case 'S': index = CONTINENT_SOUTH_AMERICA; break; + } + } + + return index; +} + +const char *getLang(int playerIndex) +{ + static cvar_t *amxmodx_language = NULL; + static cvar_t *amxmodx_cl_langs = NULL; + + if (!amxmodx_language) + amxmodx_language = CVAR_GET_POINTER("amx_language"); + + if (!amxmodx_cl_langs) + amxmodx_cl_langs = CVAR_GET_POINTER("amx_client_languages"); + + if (playerIndex >= 0 && amxmodx_cl_langs && amxmodx_language) + { + const char *value; + const char *lang; + + if (playerIndex == 0 || amxmodx_cl_langs->value <= 0 || !MF_IsPlayerIngame(playerIndex)) + { + value = amxmodx_language->string; + } + else + { + value = ENTITY_KEYVALUE(MF_GetPlayerEdict(playerIndex), "lang"); + } + + if (value && *value) + { + for (size_t i = 0; i < LangList.length(); ++i) + { + lang = LangList.at(i).chars(); + + if (stristr(lang, value) != NULL) + { + return lang; + } + } + } + } + + return "en"; +} diff --git a/dlls/geoip/geoip_util.h b/dlls/geoip/geoip_util.h new file mode 100644 index 00000000..c6c19909 --- /dev/null +++ b/dlls/geoip/geoip_util.h @@ -0,0 +1,34 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// GeoIP Module +// + +#ifndef _INCLUDE_GEOIPUTIL_H +#define _INCLUDE_GEOIPUTIL_H + +#include "geoip_main.h" + +#if defined(WIN32) + #define snprintf _snprintf +#endif + +char *stripPort(char *ip); + +bool lookupByIp(const char *ip, const char **path, MMDB_entry_data_s *result); +double lookupDouble(const char *ip, const char **path); +const char *lookupString(const char *ip, const char **path, int *length = NULL); + +int getContinentId(const char *code); +const char *getLang(int playerIndex); + +const char* stristr(const char* str, const char* substr); + +#endif // _INCLUDE_GEOIPUTIL_H diff --git a/dlls/geoip/msvc10/geoip.vcxproj b/dlls/geoip/msvc10/geoip.vcxproj index cc5e5fe3..3e1d5b8e 100644 --- a/dlls/geoip/msvc10/geoip.vcxproj +++ b/dlls/geoip/msvc10/geoip.vcxproj @@ -52,8 +52,8 @@ Disabled - ..\;..\sdk;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;GEOIP_EXPORTS;%(PreprocessorDefinitions) + ..\;..\sdk;..\..\..\public\amtl;..\GeoIP2;$(METAMOD)\metamod;$(HLSDK)\common;$(HLSDK)\engine;$(HLSDK)\dlls;$(HLSDK)\pm_shared;$(HLSDK)\public;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;GEOIP_EXPORTS;HAVE_STDINT_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebug @@ -75,8 +75,8 @@ - ..\;..\sdk;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;GEOIP_EXPORTS;%(PreprocessorDefinitions) + ..\;..\sdk;..\..\..\public\amtl;..\GeoIP2;$(METAMOD)\metamod;$(HLSDK)\common;$(HLSDK)\engine;$(HLSDK)\dlls;$(HLSDK)\pm_shared;$(HLSDK)\public;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;GEOIP_EXPORTS;HAVE_STDINT_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) MultiThreaded false @@ -95,14 +95,19 @@ - - + + + + - - - + + + + + + diff --git a/dlls/geoip/msvc10/geoip.vcxproj.filters b/dlls/geoip/msvc10/geoip.vcxproj.filters index 514bdb69..87f791de 100644 --- a/dlls/geoip/msvc10/geoip.vcxproj.filters +++ b/dlls/geoip/msvc10/geoip.vcxproj.filters @@ -9,9 +9,6 @@ {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hpp;hxx;hm;inl;inc;xsd - - {2df41d4d-d80c-4557-88e6-0a8e902154d5} - {a6d73610-c960-4557-87c5-2d1b137ed3b3} @@ -21,34 +18,52 @@ {f31e7815-11bd-4a86-899e-43f85dfdc067} + + {0bd4b9fb-f847-4fe5-af3e-9000fc854c5c} + - - Source Files - - - GeoIP - Module SDK\SDK Base + + GeoIP2 + + + Source Files + + + Source Files + + + Source Files + - - Header Files - - - Header Files - - - GeoIP - Module SDK Module SDK\SDK Base + + GeoIP2 + + + GeoIP2 + + + GeoIP2 + + + Header Files + + + Header Files + + + Header Files + diff --git a/dlls/geoip/sdk/amxxmodule.cpp b/dlls/geoip/sdk/amxxmodule.cpp index efb933b3..7de02e6e 100755 --- a/dlls/geoip/sdk/amxxmodule.cpp +++ b/dlls/geoip/sdk/amxxmodule.cpp @@ -1,36 +1,16 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* Parts Copyright (C) 2001-2003 Will Day -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -* -* Description: AMX Mod X Module Interface Functions -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Parts Copyright (C) 2001-2003 Will Day +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module SDK +// #include #include diff --git a/dlls/geoip/sdk/amxxmodule.h b/dlls/geoip/sdk/amxxmodule.h index 3ca8c7b6..6a760b25 100755 --- a/dlls/geoip/sdk/amxxmodule.h +++ b/dlls/geoip/sdk/amxxmodule.h @@ -1,7 +1,16 @@ -/* - * AMX Mod X Module Interface Functions - * This file may be freely used -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license +// + +// +// Module SDK +// // prevent double include #ifndef __AMXXMODULE_H__ diff --git a/dlls/geoip/sdk/moduleconfig.h b/dlls/geoip/sdk/moduleconfig.h index 837e67a4..e2b075fb 100755 --- a/dlls/geoip/sdk/moduleconfig.h +++ b/dlls/geoip/sdk/moduleconfig.h @@ -1,4 +1,15 @@ -// Configuration +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module Config +// #ifndef __MODULECONFIG_H__ #define __MODULECONFIG_H__ @@ -18,7 +29,7 @@ #define MODULE_LIBRARY "geoip" #define MODULE_LIBCLASS "" // If you want the module not to be reloaded on mapchange, remove / comment out the next line -//#define MODULE_RELOAD_ON_MAPCHANGE +#define MODULE_RELOAD_ON_MAPCHANGE #ifdef __DATE__ #define MODULE_DATE __DATE__ @@ -27,7 +38,7 @@ #endif // __DATE__ // metamod plugin? -//#define USE_METAMOD +#define USE_METAMOD // use memory manager/tester? // note that if you use this, you cannot construct/allocate diff --git a/dlls/hamsandwich/DataHandler.cpp b/dlls/hamsandwich/DataHandler.cpp index 48b6d168..6b8286eb 100644 --- a/dlls/hamsandwich/DataHandler.cpp +++ b/dlls/hamsandwich/DataHandler.cpp @@ -1,31 +1,16 @@ -/* Ham Sandwich - * Copyright 2007-2014 - * By the AMX Mod X Development Team - * - * Ham Sandwich is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * Ham Sandwich is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Ham Sandwich; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of Ham Sandwich with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Ham Sandwich Module +// + #include "amxxmodule.h" #include "CVector.h" diff --git a/dlls/hamsandwich/DataHandler.h b/dlls/hamsandwich/DataHandler.h index 883f8fa2..3a5e765f 100644 --- a/dlls/hamsandwich/DataHandler.h +++ b/dlls/hamsandwich/DataHandler.h @@ -1,31 +1,16 @@ -/* Ham Sandwich - * Copyright 2007-2014 - * By the AMX Mod X Development Team - * - * Ham Sandwich is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * Ham Sandwich is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Ham Sandwich; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of Ham Sandwich with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Ham Sandwich Module +// + #ifndef RETURNHANDLER_H #define RETURNHANDLER_H diff --git a/dlls/hamsandwich/NEW_Util.h b/dlls/hamsandwich/NEW_Util.h index 31cffe5a..ea008f71 100644 --- a/dlls/hamsandwich/NEW_Util.h +++ b/dlls/hamsandwich/NEW_Util.h @@ -1,31 +1,15 @@ -/* Ham Sandwich - * Copyright 2007-2014 - * By the AMX Mod X Development Team - * - * Ham Sandwich is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * Ham Sandwich is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Ham Sandwich; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of Ham Sandwich with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Ham Sandwich Module +// /* Inlined replacements for INDEXENT/ENTINDEX * It only really removes the overhead of the push/jump diff --git a/dlls/hamsandwich/Trampolines.h b/dlls/hamsandwich/Trampolines.h index 816019fa..d9bba05e 100644 --- a/dlls/hamsandwich/Trampolines.h +++ b/dlls/hamsandwich/Trampolines.h @@ -1,31 +1,15 @@ -/* Trampolines - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ - +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Ham Sandwich Module +// #ifndef TRAMPOLINES_H #define TRAMPOLINES_H diff --git a/dlls/hamsandwich/amxx_api.cpp b/dlls/hamsandwich/amxx_api.cpp index 09431fd5..40d9be44 100644 --- a/dlls/hamsandwich/amxx_api.cpp +++ b/dlls/hamsandwich/amxx_api.cpp @@ -1,31 +1,15 @@ -/* Ham Sandwich - * Copyright 2007-2014 - * By the AMX Mod X Development Team - * - * Ham Sandwich is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * Ham Sandwich is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Ham Sandwich; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of Ham Sandwich with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Ham Sandwich Module +// #include "amxxmodule.h" #include diff --git a/dlls/hamsandwich/call_funcs.cpp b/dlls/hamsandwich/call_funcs.cpp index df1c61fb..32a823fa 100644 --- a/dlls/hamsandwich/call_funcs.cpp +++ b/dlls/hamsandwich/call_funcs.cpp @@ -1,31 +1,16 @@ -/* Ham Sandwich - * Copyright 2007-2014 - * By the AMX Mod X Development Team - * - * Ham Sandwich is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * Ham Sandwich is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Ham Sandwich; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of Ham Sandwich with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Ham Sandwich Module +// + #include "amxxmodule.h" #include "offsets.h" @@ -1833,4 +1818,4 @@ cell Call_Deprecated(AMX *amx, cell *params) MF_LogError(amx, AMX_ERR_NATIVE, "Ham function is deprecated."); return 0; -} \ No newline at end of file +} diff --git a/dlls/hamsandwich/call_funcs.h b/dlls/hamsandwich/call_funcs.h index 4f3cef63..b54d0a74 100644 --- a/dlls/hamsandwich/call_funcs.h +++ b/dlls/hamsandwich/call_funcs.h @@ -1,31 +1,16 @@ -/* Ham Sandwich - * Copyright 2007-2014 - * By the AMX Mod X Development Team - * - * Ham Sandwich is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * Ham Sandwich is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Ham Sandwich; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of Ham Sandwich with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Ham Sandwich Module +// + #ifndef HOOK_Call_H #define HOOK_Call_H diff --git a/dlls/hamsandwich/celltotype.h b/dlls/hamsandwich/celltotype.h index 57f4581a..5b377380 100644 --- a/dlls/hamsandwich/celltotype.h +++ b/dlls/hamsandwich/celltotype.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Ham Sandwich Module +// + #ifndef CELLTOTYPE_H #define CELLTOTYPE_H diff --git a/dlls/hamsandwich/config_parser.cpp b/dlls/hamsandwich/config_parser.cpp index 87dcf6c1..0d01999c 100644 --- a/dlls/hamsandwich/config_parser.cpp +++ b/dlls/hamsandwich/config_parser.cpp @@ -1,31 +1,16 @@ -/* Ham Sandwich - * Copyright 2007-2014 - * By the AMX Mod X Development Team - * - * Ham Sandwich is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * Ham Sandwich is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Ham Sandwich; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of Ham Sandwich with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Ham Sandwich Module +// + #include "amxxmodule.h" #include "ham_const.h" diff --git a/dlls/hamsandwich/forward.h b/dlls/hamsandwich/forward.h index 2e621316..f6296497 100644 --- a/dlls/hamsandwich/forward.h +++ b/dlls/hamsandwich/forward.h @@ -1,31 +1,16 @@ -/* Ham Sandwich - * Copyright 2007-2014 - * By the AMX Mod X Development Team - * - * Ham Sandwich is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * Ham Sandwich is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Ham Sandwich; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of Ham Sandwich with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Ham Sandwich Module +// + #include "amxxmodule.h" #ifndef FORWARD_H diff --git a/dlls/hamsandwich/ham_const.h b/dlls/hamsandwich/ham_const.h index 65ef5404..c98ed9b4 100644 --- a/dlls/hamsandwich/ham_const.h +++ b/dlls/hamsandwich/ham_const.h @@ -1,31 +1,15 @@ -/* Ham Sandwich - * Copyright 2007-2014 - * By the AMX Mod X Development Team - * - * Ham Sandwich is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * Ham Sandwich is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Ham Sandwich; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of Ham Sandwich with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Ham Sandwich Module +// #ifndef HAM_CONST_H #define HAM_CONST_H diff --git a/dlls/hamsandwich/ham_utils.h b/dlls/hamsandwich/ham_utils.h index ca50bb6c..2f1f9d70 100644 --- a/dlls/hamsandwich/ham_utils.h +++ b/dlls/hamsandwich/ham_utils.h @@ -1,31 +1,15 @@ -/* Ham Sandwich - * Copyright 2007-2014 - * By the AMX Mod X Development Team - * - * Ham Sandwich is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * Ham Sandwich is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Ham Sandwich; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of Ham Sandwich with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Ham Sandwich Module +// #ifndef HAM_UTILS_H #define HAM_UTILS_H diff --git a/dlls/hamsandwich/hook.h b/dlls/hamsandwich/hook.h index 330a3f2f..1bce3272 100644 --- a/dlls/hamsandwich/hook.h +++ b/dlls/hamsandwich/hook.h @@ -1,31 +1,16 @@ -/* Ham Sandwich - * Copyright 2007-2014 - * By the AMX Mod X Development Team - * - * Ham Sandwich is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * Ham Sandwich is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Ham Sandwich; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of Ham Sandwich with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Ham Sandwich Module +// + #ifndef HOOK_H #define HOOK_H diff --git a/dlls/hamsandwich/hook_callbacks.cpp b/dlls/hamsandwich/hook_callbacks.cpp index 971a3c98..250adce0 100644 --- a/dlls/hamsandwich/hook_callbacks.cpp +++ b/dlls/hamsandwich/hook_callbacks.cpp @@ -1,31 +1,16 @@ -/* Ham Sandwich - * Copyright 2007-2014 - * By the AMX Mod X Development Team - * - * Ham Sandwich is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * Ham Sandwich is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Ham Sandwich; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of Ham Sandwich with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Ham Sandwich Module +// + #include #include #include diff --git a/dlls/hamsandwich/hook_callbacks.h b/dlls/hamsandwich/hook_callbacks.h index a3275b48..35aa6ee9 100644 --- a/dlls/hamsandwich/hook_callbacks.h +++ b/dlls/hamsandwich/hook_callbacks.h @@ -1,31 +1,16 @@ -/* Ham Sandwich - * Copyright 2007-2014 - * By the AMX Mod X Development Team - * - * Ham Sandwich is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * Ham Sandwich is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Ham Sandwich; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of Ham Sandwich with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Ham Sandwich Module +// + #ifndef HOOK_CALLBACKS_H #define HOOK_CALLBACKS_H diff --git a/dlls/hamsandwich/hook_create.cpp b/dlls/hamsandwich/hook_create.cpp index 495761e3..d39322ae 100644 --- a/dlls/hamsandwich/hook_create.cpp +++ b/dlls/hamsandwich/hook_create.cpp @@ -1,31 +1,16 @@ -/* Ham Sandwich - * Copyright 2007-2014 - * By the AMX Mod X Development Team - * - * Ham Sandwich is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * Ham Sandwich is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Ham Sandwich; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of Ham Sandwich with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Ham Sandwich Module +// + #include "amxxmodule.h" int Create_Void_Void(AMX *amx, const char *func) diff --git a/dlls/hamsandwich/hook_create.h b/dlls/hamsandwich/hook_create.h index a384d921..46cda919 100644 --- a/dlls/hamsandwich/hook_create.h +++ b/dlls/hamsandwich/hook_create.h @@ -1,31 +1,16 @@ -/* Ham Sandwich - * Copyright 2007-2014 - * By the AMX Mod X Development Team - * - * Ham Sandwich is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * Ham Sandwich is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Ham Sandwich; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of Ham Sandwich with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Ham Sandwich Module +// + #ifndef HOOK_CREATE_H #define HOOK_CREATE_H diff --git a/dlls/hamsandwich/hook_native.cpp b/dlls/hamsandwich/hook_native.cpp index 1cfdcfc5..748c2406 100644 --- a/dlls/hamsandwich/hook_native.cpp +++ b/dlls/hamsandwich/hook_native.cpp @@ -1,31 +1,16 @@ -/* Ham Sandwich - * Copyright 2007-2014 - * By the AMX Mod X Development Team - * - * Ham Sandwich is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * Ham Sandwich is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Ham Sandwich; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of Ham Sandwich with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Ham Sandwich Module +// + #include #include #include diff --git a/dlls/hamsandwich/hook_specialbot.cpp b/dlls/hamsandwich/hook_specialbot.cpp index 938ff461..0d071f8c 100644 --- a/dlls/hamsandwich/hook_specialbot.cpp +++ b/dlls/hamsandwich/hook_specialbot.cpp @@ -1,31 +1,15 @@ -/* Ham Sandwich - * Copyright 2007-2014 - * By the AMX Mod X Development Team - * - * Ham Sandwich is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * Ham Sandwich is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Ham Sandwich; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of Ham Sandwich with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Ham Sandwich Module +// #include "hook_specialbot.h" #include "hooklist.h" diff --git a/dlls/hamsandwich/hook_specialbot.h b/dlls/hamsandwich/hook_specialbot.h index 7992243e..26a3a561 100644 --- a/dlls/hamsandwich/hook_specialbot.h +++ b/dlls/hamsandwich/hook_specialbot.h @@ -1,31 +1,15 @@ -/* Ham Sandwich - * Copyright 2007-2014 - * By the AMX Mod X Development Team - * - * Ham Sandwich is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * Ham Sandwich is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Ham Sandwich; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of Ham Sandwich with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Ham Sandwich Module +// #ifndef HOOK_SPECIALBOT_H #define HOOK_SPECIALBOT_H diff --git a/dlls/hamsandwich/hooklist.h b/dlls/hamsandwich/hooklist.h index ef74a22e..a4b07fb7 100644 --- a/dlls/hamsandwich/hooklist.h +++ b/dlls/hamsandwich/hooklist.h @@ -1,31 +1,16 @@ -/* Ham Sandwich - * Copyright 2007-2014 - * By the AMX Mod X Development Team - * - * Ham Sandwich is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * Ham Sandwich is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Ham Sandwich; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of Ham Sandwich with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Ham Sandwich Module +// + #ifndef HOOKLIST_T_H #define HOOKLIST_T_H diff --git a/dlls/hamsandwich/offsets.h b/dlls/hamsandwich/offsets.h index 815d9ea3..e293bc6a 100644 --- a/dlls/hamsandwich/offsets.h +++ b/dlls/hamsandwich/offsets.h @@ -1,31 +1,15 @@ -/* Ham Sandwich - * Copyright 2007-2014 - * By the AMX Mod X Development Team - * - * Ham Sandwich is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * Ham Sandwich is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Ham Sandwich; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of Ham Sandwich with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Ham Sandwich Module +// #ifndef OFFSETS_H #define OFFSETS_H diff --git a/dlls/hamsandwich/pdata.cpp b/dlls/hamsandwich/pdata.cpp index 9839c6b8..b6ad7f69 100644 --- a/dlls/hamsandwich/pdata.cpp +++ b/dlls/hamsandwich/pdata.cpp @@ -1,31 +1,16 @@ -/* Ham Sandwich - * Copyright 2007-2014 - * By the AMX Mod X Development Team - * - * Ham Sandwich is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * Ham Sandwich is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Ham Sandwich; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of Ham Sandwich with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Ham Sandwich Module +// + #include "amxxmodule.h" #include "offsets.h" #include "NEW_Util.h" diff --git a/dlls/hamsandwich/sdk/CString.h b/dlls/hamsandwich/sdk/CString.h index bfd7061d..745457ba 100644 --- a/dlls/hamsandwich/sdk/CString.h +++ b/dlls/hamsandwich/sdk/CString.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef _INCLUDE_CSTRING_H #define _INCLUDE_CSTRING_H diff --git a/dlls/hamsandwich/sdk/CVector.h b/dlls/hamsandwich/sdk/CVector.h index 1d733abb..da13eceb 100644 --- a/dlls/hamsandwich/sdk/CVector.h +++ b/dlls/hamsandwich/sdk/CVector.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef __CVECTOR_H__ #define __CVECTOR_H__ diff --git a/dlls/hamsandwich/sdk/amxxmodule.cpp b/dlls/hamsandwich/sdk/amxxmodule.cpp index efb933b3..7de02e6e 100644 --- a/dlls/hamsandwich/sdk/amxxmodule.cpp +++ b/dlls/hamsandwich/sdk/amxxmodule.cpp @@ -1,36 +1,16 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* Parts Copyright (C) 2001-2003 Will Day -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -* -* Description: AMX Mod X Module Interface Functions -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Parts Copyright (C) 2001-2003 Will Day +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module SDK +// #include #include diff --git a/dlls/hamsandwich/sdk/amxxmodule.h b/dlls/hamsandwich/sdk/amxxmodule.h index 3ca8c7b6..6a760b25 100644 --- a/dlls/hamsandwich/sdk/amxxmodule.h +++ b/dlls/hamsandwich/sdk/amxxmodule.h @@ -1,7 +1,16 @@ -/* - * AMX Mod X Module Interface Functions - * This file may be freely used -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license +// + +// +// Module SDK +// // prevent double include #ifndef __AMXXMODULE_H__ diff --git a/dlls/hamsandwich/sdk/moduleconfig.h b/dlls/hamsandwich/sdk/moduleconfig.h index 34ccb62a..bab9e69e 100644 --- a/dlls/hamsandwich/sdk/moduleconfig.h +++ b/dlls/hamsandwich/sdk/moduleconfig.h @@ -1,4 +1,16 @@ -// Configuration +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Parts Copyright (C) 2001-2003 Will Day +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module Config +// #ifndef __MODULECONFIG_H__ #define __MODULECONFIG_H__ diff --git a/dlls/hamsandwich/srvcmd.cpp b/dlls/hamsandwich/srvcmd.cpp index a877c457..e03f3093 100644 --- a/dlls/hamsandwich/srvcmd.cpp +++ b/dlls/hamsandwich/srvcmd.cpp @@ -1,31 +1,15 @@ -/* Ham Sandwich - * Copyright 2007-2014 - * By the AMX Mod X Development Team - * - * Ham Sandwich is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * Ham Sandwich is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Ham Sandwich; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of Ham Sandwich with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Ham Sandwich Module +// #include "amxxmodule.h" diff --git a/dlls/hamsandwich/typetocell.h b/dlls/hamsandwich/typetocell.h index fb0cb519..63ddefea 100644 --- a/dlls/hamsandwich/typetocell.h +++ b/dlls/hamsandwich/typetocell.h @@ -1,31 +1,16 @@ -/* Ham Sandwich - * Copyright 2007-2014 - * By the AMX Mod X Development Team - * - * Ham Sandwich is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * Ham Sandwich is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Ham Sandwich; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of Ham Sandwich with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Ham Sandwich Module +// + #ifndef TYPETOCELL_H #define TYPETOCELL_H diff --git a/dlls/mysqlx/basic_sql.cpp b/dlls/mysqlx/basic_sql.cpp index 344f7f47..da4d7e12 100644 --- a/dlls/mysqlx/basic_sql.cpp +++ b/dlls/mysqlx/basic_sql.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// MySQL Module +// + #include #include "sh_list.h" #include "mysql2_header.h" diff --git a/dlls/mysqlx/handles.cpp b/dlls/mysqlx/handles.cpp index bee22626..b48b33f7 100644 --- a/dlls/mysqlx/handles.cpp +++ b/dlls/mysqlx/handles.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// MySQL Module +// + #include #include "sh_stack.h" #include "CVector.h" diff --git a/dlls/mysqlx/module.cpp b/dlls/mysqlx/module.cpp index aaa31175..de0f0841 100644 --- a/dlls/mysqlx/module.cpp +++ b/dlls/mysqlx/module.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// MySQL Module +// + #include "amxxmodule.h" #include "mysql2_header.h" #include "sqlheaders.h" diff --git a/dlls/mysqlx/mysql/ISQLDriver.h b/dlls/mysqlx/mysql/ISQLDriver.h index 5da94b0a..dfecca18 100644 --- a/dlls/mysqlx/mysql/ISQLDriver.h +++ b/dlls/mysqlx/mysql/ISQLDriver.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// MySQL Module +// + #ifndef _INCLUDE_SOURCEMOD_DATABASE2_H #define _INCLUDE_SOURCEMOD_DATABASE2_H diff --git a/dlls/mysqlx/mysql/MysqlDatabase.cpp b/dlls/mysqlx/mysql/MysqlDatabase.cpp index 30114f98..98b67144 100644 --- a/dlls/mysqlx/mysql/MysqlDatabase.cpp +++ b/dlls/mysqlx/mysql/MysqlDatabase.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// MySQL Module +// + #include #include #include "MysqlDriver.h" diff --git a/dlls/mysqlx/mysql/MysqlDatabase.h b/dlls/mysqlx/mysql/MysqlDatabase.h index a33cff84..8a1f71a1 100644 --- a/dlls/mysqlx/mysql/MysqlDatabase.h +++ b/dlls/mysqlx/mysql/MysqlDatabase.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// MySQL Module +// + #ifndef _INCLUDE_SOURCEMOD_MYSQL_DATABASE_H #define _INCLUDE_SOURCEMOD_MYSQL_DATABASE_H diff --git a/dlls/mysqlx/mysql/MysqlDriver.cpp b/dlls/mysqlx/mysql/MysqlDriver.cpp index 3fd0e3e6..3ef7b201 100644 --- a/dlls/mysqlx/mysql/MysqlDriver.cpp +++ b/dlls/mysqlx/mysql/MysqlDriver.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// MySQL Module +// + #include #include #include "MysqlDriver.h" diff --git a/dlls/mysqlx/mysql/MysqlDriver.h b/dlls/mysqlx/mysql/MysqlDriver.h index 941964cd..79f75ae2 100644 --- a/dlls/mysqlx/mysql/MysqlDriver.h +++ b/dlls/mysqlx/mysql/MysqlDriver.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// MySQL Module +// + #ifndef _INCLUDE_SOURCEMOD_MYSQL_DRIVER_H #define _INCLUDE_SOURCEMOD_MYSQL_DRIVER_H diff --git a/dlls/mysqlx/mysql/MysqlHeaders.h b/dlls/mysqlx/mysql/MysqlHeaders.h index 413c582c..40285576 100644 --- a/dlls/mysqlx/mysql/MysqlHeaders.h +++ b/dlls/mysqlx/mysql/MysqlHeaders.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// MySQL Module +// + #ifndef _INCLUDE_SOURCEMOD_MYSQL_HEADERS_H #define _INCLUDE_SOURCEMOD_MYSQL_HEADERS_H diff --git a/dlls/mysqlx/mysql/MysqlQuery.cpp b/dlls/mysqlx/mysql/MysqlQuery.cpp index 9fc6ccc7..60fa427f 100644 --- a/dlls/mysqlx/mysql/MysqlQuery.cpp +++ b/dlls/mysqlx/mysql/MysqlQuery.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// MySQL Module +// + #include #include #include "MysqlQuery.h" diff --git a/dlls/mysqlx/mysql/MysqlQuery.h b/dlls/mysqlx/mysql/MysqlQuery.h index 0549c108..7b43dffc 100644 --- a/dlls/mysqlx/mysql/MysqlQuery.h +++ b/dlls/mysqlx/mysql/MysqlQuery.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// MySQL Module +// + #ifndef _INCLUDE_SOURCEMOD_MYSQL_QUERY_H #define _INCLUDE_SOURCEMOD_MYSQL_QUERY_H diff --git a/dlls/mysqlx/mysql/MysqlResultSet.cpp b/dlls/mysqlx/mysql/MysqlResultSet.cpp index 77a3169d..a79e89db 100644 --- a/dlls/mysqlx/mysql/MysqlResultSet.cpp +++ b/dlls/mysqlx/mysql/MysqlResultSet.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// MySQL Module +// + #include #include #include "MysqlResultSet.h" diff --git a/dlls/mysqlx/mysql/MysqlResultSet.h b/dlls/mysqlx/mysql/MysqlResultSet.h index 5257b6c5..849486eb 100644 --- a/dlls/mysqlx/mysql/MysqlResultSet.h +++ b/dlls/mysqlx/mysql/MysqlResultSet.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// MySQL Module +// + #ifndef _INCLUDE_SOURCEMOD_MYSQL_RESULTSET_H #define _INCLUDE_SOURCEMOD_MYSQL_RESULTSET_H diff --git a/dlls/mysqlx/mysql2_header.h b/dlls/mysqlx/mysql2_header.h index ee21b37e..817d900c 100644 --- a/dlls/mysqlx/mysql2_header.h +++ b/dlls/mysqlx/mysql2_header.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// MySQL Module +// + #ifndef _INCLUDE_AMXMODX_MYSQL2_HEADER_H #define _INCLUDE_AMXMODX_MYSQL2_HEADER_H diff --git a/dlls/mysqlx/oldcompat_sql.cpp b/dlls/mysqlx/oldcompat_sql.cpp index 3b206e2c..bd82a733 100644 --- a/dlls/mysqlx/oldcompat_sql.cpp +++ b/dlls/mysqlx/oldcompat_sql.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// MySQL Module +// + #include #include "sh_list.h" #include "mysql2_header.h" diff --git a/dlls/mysqlx/sdk/CVector.h b/dlls/mysqlx/sdk/CVector.h index 24355d4e..44241413 100755 --- a/dlls/mysqlx/sdk/CVector.h +++ b/dlls/mysqlx/sdk/CVector.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef __CVECTOR_H__ #define __CVECTOR_H__ diff --git a/dlls/mysqlx/sdk/amxxmodule.cpp b/dlls/mysqlx/sdk/amxxmodule.cpp index efb933b3..7de02e6e 100755 --- a/dlls/mysqlx/sdk/amxxmodule.cpp +++ b/dlls/mysqlx/sdk/amxxmodule.cpp @@ -1,36 +1,16 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* Parts Copyright (C) 2001-2003 Will Day -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -* -* Description: AMX Mod X Module Interface Functions -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Parts Copyright (C) 2001-2003 Will Day +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module SDK +// #include #include diff --git a/dlls/mysqlx/sdk/amxxmodule.h b/dlls/mysqlx/sdk/amxxmodule.h index 3ca8c7b6..6a760b25 100755 --- a/dlls/mysqlx/sdk/amxxmodule.h +++ b/dlls/mysqlx/sdk/amxxmodule.h @@ -1,7 +1,16 @@ -/* - * AMX Mod X Module Interface Functions - * This file may be freely used -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license +// + +// +// Module SDK +// // prevent double include #ifndef __AMXXMODULE_H__ diff --git a/dlls/mysqlx/sdk/moduleconfig.h b/dlls/mysqlx/sdk/moduleconfig.h index 460b3435..3ebdd4e4 100755 --- a/dlls/mysqlx/sdk/moduleconfig.h +++ b/dlls/mysqlx/sdk/moduleconfig.h @@ -1,4 +1,15 @@ -// Configuration +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module Config +// #ifndef __MODULECONFIG_H__ #define __MODULECONFIG_H__ diff --git a/dlls/mysqlx/sqlheaders.h b/dlls/mysqlx/sqlheaders.h index e756f703..062e2e8c 100644 --- a/dlls/mysqlx/sqlheaders.h +++ b/dlls/mysqlx/sqlheaders.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// MySQL Module +// + #ifndef _INCLUDE_SQLHEADERS_H #define _INCLUDE_SQLHEADERS_H diff --git a/dlls/mysqlx/thread/BaseWorker.cpp b/dlls/mysqlx/thread/BaseWorker.cpp index 4e107f92..f02758a4 100644 --- a/dlls/mysqlx/thread/BaseWorker.cpp +++ b/dlls/mysqlx/thread/BaseWorker.cpp @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include "BaseWorker.h" BaseWorker::BaseWorker() : diff --git a/dlls/mysqlx/thread/BaseWorker.h b/dlls/mysqlx/thread/BaseWorker.h index 37b8f5fd..b2a218cf 100644 --- a/dlls/mysqlx/thread/BaseWorker.h +++ b/dlls/mysqlx/thread/BaseWorker.h @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #ifndef _INCLUDE_SOURCEMOD_BASEWORKER_H #define _INCLUDE_SOURCEMOD_BASEWORKER_H diff --git a/dlls/mysqlx/thread/IThreader.h b/dlls/mysqlx/thread/IThreader.h index f9c3e8a2..b27673d2 100644 --- a/dlls/mysqlx/thread/IThreader.h +++ b/dlls/mysqlx/thread/IThreader.h @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #ifndef _INCLUDE_SOURCEMOD_THREADER_H #define _INCLUDE_SOURCEMOD_THREADER_H diff --git a/dlls/mysqlx/thread/PosixThreads.cpp b/dlls/mysqlx/thread/PosixThreads.cpp index 47d66899..1e112739 100644 --- a/dlls/mysqlx/thread/PosixThreads.cpp +++ b/dlls/mysqlx/thread/PosixThreads.cpp @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include #include "PosixThreads.h" diff --git a/dlls/mysqlx/thread/PosixThreads.h b/dlls/mysqlx/thread/PosixThreads.h index 95245d79..15ed6f97 100644 --- a/dlls/mysqlx/thread/PosixThreads.h +++ b/dlls/mysqlx/thread/PosixThreads.h @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #ifndef _INCLUDE_POSIXTHREADS_H_ #define _INCLUDE_POSIXTHREADS_H_ diff --git a/dlls/mysqlx/thread/ThreadSupport.h b/dlls/mysqlx/thread/ThreadSupport.h index b15b0d30..c69f9d40 100644 --- a/dlls/mysqlx/thread/ThreadSupport.h +++ b/dlls/mysqlx/thread/ThreadSupport.h @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #ifndef _INCLUDE_SOURCEMOD_THREAD_SUPPORT_H #define _INCLUDE_SOURCEMOD_THREAD_SUPPORT_H diff --git a/dlls/mysqlx/thread/ThreadWorker.cpp b/dlls/mysqlx/thread/ThreadWorker.cpp index 4c061067..a2393949 100644 --- a/dlls/mysqlx/thread/ThreadWorker.cpp +++ b/dlls/mysqlx/thread/ThreadWorker.cpp @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include "ThreadWorker.h" ThreadWorker::ThreadWorker() : diff --git a/dlls/mysqlx/thread/ThreadWorker.h b/dlls/mysqlx/thread/ThreadWorker.h index 6c630ecf..ec9db997 100644 --- a/dlls/mysqlx/thread/ThreadWorker.h +++ b/dlls/mysqlx/thread/ThreadWorker.h @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #ifndef _INCLUDE_SOURCEMOD_THREADWORKER_H #define _INCLUDE_SOURCEMOD_THREADWORKER_H diff --git a/dlls/mysqlx/thread/WinThreads.cpp b/dlls/mysqlx/thread/WinThreads.cpp index 6f3f436f..6be2346f 100644 --- a/dlls/mysqlx/thread/WinThreads.cpp +++ b/dlls/mysqlx/thread/WinThreads.cpp @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include "WinThreads.h" void WinThreader::ThreadSleep(unsigned int ms) diff --git a/dlls/mysqlx/thread/WinThreads.h b/dlls/mysqlx/thread/WinThreads.h index 4bec6fd3..574fa2ec 100644 --- a/dlls/mysqlx/thread/WinThreads.h +++ b/dlls/mysqlx/thread/WinThreads.h @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #ifndef _INCLUDE_WINTHREADS_H_ #define _INCLUDE_WINTHREADS_H_ diff --git a/dlls/mysqlx/threading.cpp b/dlls/mysqlx/threading.cpp index 6e973cbe..3dfa1301 100644 --- a/dlls/mysqlx/threading.cpp +++ b/dlls/mysqlx/threading.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// MySQL Module +// + #include "amxxmodule.h" #include "mysql2_header.h" #include "threading.h" diff --git a/dlls/mysqlx/threading.h b/dlls/mysqlx/threading.h index b25782a9..6949049d 100644 --- a/dlls/mysqlx/threading.h +++ b/dlls/mysqlx/threading.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// MySQL Module +// + #ifndef _INCLUDE_MYSQL_THREADING_H #define _INCLUDE_MYSQL_THREADING_H diff --git a/dlls/ns/AllocString.h b/dlls/ns/AllocString.h index b5134ba0..6179227b 100644 --- a/dlls/ns/AllocString.h +++ b/dlls/ns/AllocString.h @@ -1,35 +1,15 @@ -/* AMX Mod X - * Natural Selection Module - * - * by the AMX Mod X Development Team - * - * This file is part of AMX Mod X. - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection Module +// /* This file is a replacement for the engine call of ALLOC_STRING * The main difference is that a string will not be allocated twice diff --git a/dlls/ns/CPlayer.h b/dlls/ns/CPlayer.h index 921d6c7c..f2f7ad30 100755 --- a/dlls/ns/CPlayer.h +++ b/dlls/ns/CPlayer.h @@ -1,35 +1,15 @@ -/* AMX Mod X - * Natural Selection Module - * - * by the AMX Mod X Development Team - * - * This file is part of AMX Mod X. - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection Module +// /* This is the basic data stored for players */ #ifndef CPLAYER_H diff --git a/dlls/ns/CString.h b/dlls/ns/CString.h index 632f430b..f7c9c374 100644 --- a/dlls/ns/CString.h +++ b/dlls/ns/CString.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef _INCLUDE_CSTRING_H #define _INCLUDE_CSTRING_H diff --git a/dlls/ns/CVector.h b/dlls/ns/CVector.h index 74f85954..670c5cae 100644 --- a/dlls/ns/CVector.h +++ b/dlls/ns/CVector.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef __CVECTOR_H__ #define __CVECTOR_H__ diff --git a/dlls/ns/GameManager.cpp b/dlls/ns/GameManager.cpp index eabaf84c..ca09fef7 100644 --- a/dlls/ns/GameManager.cpp +++ b/dlls/ns/GameManager.cpp @@ -1,35 +1,15 @@ -/* AMX Mod X - * Natural Selection Module - * - * by the AMX Mod X Development Team - * - * This file is part of AMX Mod X. - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection Module +// /* This holds the functions which determine which hooks I need forwareded */ diff --git a/dlls/ns/GameManager.h b/dlls/ns/GameManager.h index eed4f671..22e4e26f 100644 --- a/dlls/ns/GameManager.h +++ b/dlls/ns/GameManager.h @@ -1,35 +1,15 @@ -/* AMX Mod X - * Natural Selection Module - * - * by the AMX Mod X Development Team - * - * This file is part of AMX Mod X. - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection Module +// /* This file includes game-related stuff, such as message IDs * and forwards diff --git a/dlls/ns/Hash.h b/dlls/ns/Hash.h index 5e099e22..9b9b579b 100644 --- a/dlls/ns/Hash.h +++ b/dlls/ns/Hash.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection Module +// + #ifndef _HASH_H_ #define _HASH_H_ diff --git a/dlls/ns/LocationManager.h b/dlls/ns/LocationManager.h index f1ec240e..b9823054 100644 --- a/dlls/ns/LocationManager.h +++ b/dlls/ns/LocationManager.h @@ -1,35 +1,15 @@ -/* AMX Mod X - * Natural Selection Module - * - * by the AMX Mod X Development Team - * - * This file is part of AMX Mod X. - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection Module +// #ifndef LOCATIONMANAGER_H #define LOCATIONMANAGER_H diff --git a/dlls/ns/MessageHandler.cpp b/dlls/ns/MessageHandler.cpp index 17f05dac..a0d18583 100644 --- a/dlls/ns/MessageHandler.cpp +++ b/dlls/ns/MessageHandler.cpp @@ -1,35 +1,15 @@ -/* AMX Mod X - * Natural Selection Module - * - * by the AMX Mod X Development Team - * - * This file is part of AMX Mod X. - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection Module +// /* This file contains the initialization routine and message hooks * for the message handler. Note that all of the message hooks diff --git a/dlls/ns/MessageHandler.h b/dlls/ns/MessageHandler.h index 3af6aab8..74643898 100644 --- a/dlls/ns/MessageHandler.h +++ b/dlls/ns/MessageHandler.h @@ -1,35 +1,15 @@ -/* AMX Mod X - * Natural Selection Module - * - * by the AMX Mod X Development Team - * - * This file is part of AMX Mod X. - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection Module +// /* Class with virtual members for easy message handling * Don't forget to add new messages to "Initialize_MessageHandler()" diff --git a/dlls/ns/NEW_Util.h b/dlls/ns/NEW_Util.h index 6a826f93..904a805b 100644 --- a/dlls/ns/NEW_Util.h +++ b/dlls/ns/NEW_Util.h @@ -1,35 +1,15 @@ -/* AMX Mod X - * Natural Selection Module - * - * by the AMX Mod X Development Team - * - * This file is part of AMX Mod X. - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection Module +// /* Inlined replacements for INDEXENT/ENTINDEX * It only really removes the overhead of the push/jump diff --git a/dlls/ns/ParticleManager.cpp b/dlls/ns/ParticleManager.cpp index 626c4838..2996b5f7 100644 --- a/dlls/ns/ParticleManager.cpp +++ b/dlls/ns/ParticleManager.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection Module +// + #include "sdk/amxxmodule.h" #include "ns.h" diff --git a/dlls/ns/ParticleManager.h b/dlls/ns/ParticleManager.h index 07cec51f..9e06e499 100644 --- a/dlls/ns/ParticleManager.h +++ b/dlls/ns/ParticleManager.h @@ -1,35 +1,15 @@ -/* AMX Mod X - * Natural Selection Module - * - * by the AMX Mod X Development Team - * - * This file is part of AMX Mod X. - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection Module +// #ifndef PARTICLEMANAGER_H #define PARTICLEMANAGER_H diff --git a/dlls/ns/SpawnManager.h b/dlls/ns/SpawnManager.h index af6d6b1e..ca14020a 100644 --- a/dlls/ns/SpawnManager.h +++ b/dlls/ns/SpawnManager.h @@ -1,35 +1,15 @@ -/* AMX Mod X - * Natural Selection Module - * - * by the AMX Mod X Development Team - * - * This file is part of AMX Mod X. - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection Module +// #ifndef SPAWNMANAGER_H #define SPAWNMANAGER_H diff --git a/dlls/ns/TitleManager.cpp b/dlls/ns/TitleManager.cpp index f08ff64a..e9a77641 100644 --- a/dlls/ns/TitleManager.cpp +++ b/dlls/ns/TitleManager.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection Module +// + #include "sdk/amxxmodule.h" #include "ns.h" #include "TitleManager.h" diff --git a/dlls/ns/TitleManager.h b/dlls/ns/TitleManager.h index 47c58ddb..c65dcecc 100644 --- a/dlls/ns/TitleManager.h +++ b/dlls/ns/TitleManager.h @@ -1,35 +1,15 @@ -/* AMX Mod X - * Natural Selection Module - * - * by the AMX Mod X Development Team - * - * This file is part of AMX Mod X. - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection Module +// #ifndef TITLEMANAGER_H #define TITLEMANAGER_H diff --git a/dlls/ns/amxxapi.cpp b/dlls/ns/amxxapi.cpp index 5ac5f1e9..55a1144e 100644 --- a/dlls/ns/amxxapi.cpp +++ b/dlls/ns/amxxapi.cpp @@ -1,35 +1,15 @@ -/* AMX Mod X - * Natural Selection Module - * - * by the AMX Mod X Development Team - * - * This file is part of AMX Mod X. - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection Module +// /* Calls sent by AMX Mod X are handled here */ diff --git a/dlls/ns/dllapi.cpp b/dlls/ns/dllapi.cpp index c344f376..6680f57a 100644 --- a/dlls/ns/dllapi.cpp +++ b/dlls/ns/dllapi.cpp @@ -1,35 +1,15 @@ -/* AMX Mod X - * Natural Selection Module - * - * by the AMX Mod X Development Team - * - * This file is part of AMX Mod X. - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection Module +// /* Calls going from the engine to the game dll are handled here */ diff --git a/dlls/ns/engineapi.cpp b/dlls/ns/engineapi.cpp index 10a9ada6..7cc0e987 100644 --- a/dlls/ns/engineapi.cpp +++ b/dlls/ns/engineapi.cpp @@ -1,35 +1,15 @@ -/* AMX Mod X - * Natural Selection Module - * - * by the AMX Mod X Development Team - * - * This file is part of AMX Mod X. - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection Module +// /* Calls going from the game dll to the engine are handled here */ diff --git a/dlls/ns/natives/general.cpp b/dlls/ns/natives/general.cpp index 20a2e873..690b780e 100644 --- a/dlls/ns/natives/general.cpp +++ b/dlls/ns/natives/general.cpp @@ -1,35 +1,15 @@ -/* AMX Mod X - * Natural Selection Module - * - * by the AMX Mod X Development Team - * - * This file is part of AMX Mod X. - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection Module +// #include diff --git a/dlls/ns/natives/memberfuncs.cpp b/dlls/ns/natives/memberfuncs.cpp index caf0266b..a5ad8133 100644 --- a/dlls/ns/natives/memberfuncs.cpp +++ b/dlls/ns/natives/memberfuncs.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection Module +// + #include #include "../sdk/amxxmodule.h" diff --git a/dlls/ns/natives/particles.cpp b/dlls/ns/natives/particles.cpp index 716c6dbb..7d4a15bb 100644 --- a/dlls/ns/natives/particles.cpp +++ b/dlls/ns/natives/particles.cpp @@ -1,35 +1,15 @@ -/* AMX Mod X - * Natural Selection Module - * - * by the AMX Mod X Development Team - * - * This file is part of AMX Mod X. - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection Module +// #include "../sdk/amxxmodule.h" diff --git a/dlls/ns/natives/player.cpp b/dlls/ns/natives/player.cpp index c378164e..5c72e830 100644 --- a/dlls/ns/natives/player.cpp +++ b/dlls/ns/natives/player.cpp @@ -1,35 +1,15 @@ -/* AMX Mod X - * Natural Selection Module - * - * by the AMX Mod X Development Team - * - * This file is part of AMX Mod X. - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection Module +// #include "../sdk/amxxmodule.h" diff --git a/dlls/ns/natives/player_memory.cpp b/dlls/ns/natives/player_memory.cpp index 66fe5c2f..d773d678 100644 --- a/dlls/ns/natives/player_memory.cpp +++ b/dlls/ns/natives/player_memory.cpp @@ -1,35 +1,15 @@ -/* AMX Mod X - * Natural Selection Module - * - * by the AMX Mod X Development Team - * - * This file is part of AMX Mod X. - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection Module +// #include "../sdk/amxxmodule.h" diff --git a/dlls/ns/natives/structure.cpp b/dlls/ns/natives/structure.cpp index d4473e78..74cb15b0 100644 --- a/dlls/ns/natives/structure.cpp +++ b/dlls/ns/natives/structure.cpp @@ -1,35 +1,15 @@ -/* AMX Mod X - * Natural Selection Module - * - * by the AMX Mod X Development Team - * - * This file is part of AMX Mod X. - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection Module +// #include "../sdk/amxxmodule.h" diff --git a/dlls/ns/natives/weapons.cpp b/dlls/ns/natives/weapons.cpp index 3b2de17c..8fcfb2e9 100644 --- a/dlls/ns/natives/weapons.cpp +++ b/dlls/ns/natives/weapons.cpp @@ -1,35 +1,15 @@ -/* AMX Mod X - * Natural Selection Module - * - * by the AMX Mod X Development Team - * - * This file is part of AMX Mod X. - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection Module +// #include "../sdk/amxxmodule.h" diff --git a/dlls/ns/ns.h b/dlls/ns/ns.h index d88aae77..7940794c 100755 --- a/dlls/ns/ns.h +++ b/dlls/ns/ns.h @@ -1,35 +1,15 @@ -/* AMX Mod X - * Natural Selection Module - * - * by the AMX Mod X Development Team - * - * This file is part of AMX Mod X. - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection Module +// #ifndef NS_H #define NS_H diff --git a/dlls/ns/ns_const.h b/dlls/ns/ns_const.h index 3de02c1d..30d5deac 100755 --- a/dlls/ns/ns_const.h +++ b/dlls/ns/ns_const.h @@ -1,36 +1,15 @@ -/* AMX Mod X - * Natural Selection Module - * - * by the AMX Mod X Development Team - * - * This file is part of AMX Mod X. - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license +// +// Natural Selection Module +// #ifndef NS_CONST_H #define NS_CONST_H diff --git a/dlls/ns/sdk/amxxmodule.cpp b/dlls/ns/sdk/amxxmodule.cpp index efb933b3..7de02e6e 100755 --- a/dlls/ns/sdk/amxxmodule.cpp +++ b/dlls/ns/sdk/amxxmodule.cpp @@ -1,36 +1,16 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* Parts Copyright (C) 2001-2003 Will Day -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -* -* Description: AMX Mod X Module Interface Functions -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Parts Copyright (C) 2001-2003 Will Day +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module SDK +// #include #include diff --git a/dlls/ns/sdk/amxxmodule.h b/dlls/ns/sdk/amxxmodule.h index 3ca8c7b6..6a760b25 100755 --- a/dlls/ns/sdk/amxxmodule.h +++ b/dlls/ns/sdk/amxxmodule.h @@ -1,7 +1,16 @@ -/* - * AMX Mod X Module Interface Functions - * This file may be freely used -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license +// + +// +// Module SDK +// // prevent double include #ifndef __AMXXMODULE_H__ diff --git a/dlls/ns/sdk/moduleconfig.h b/dlls/ns/sdk/moduleconfig.h index 951bad32..b1f25265 100755 --- a/dlls/ns/sdk/moduleconfig.h +++ b/dlls/ns/sdk/moduleconfig.h @@ -1,4 +1,15 @@ -// Configuration +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module Config +// #ifndef __MODULECONFIG_H__ #define __MODULECONFIG_H__ diff --git a/dlls/ns/utilfunctions.h b/dlls/ns/utilfunctions.h index 73221392..da6c4c7d 100755 --- a/dlls/ns/utilfunctions.h +++ b/dlls/ns/utilfunctions.h @@ -1,35 +1,15 @@ -/* AMX Mod X - * Natural Selection Module - * - * by the AMX Mod X Development Team - * - * This file is part of AMX Mod X. - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection Module +// #ifndef UTILFUNCTIONS_H #define UTILFUNCTIONS_H diff --git a/dlls/ns/utils.cpp b/dlls/ns/utils.cpp index f75bf1e7..88638f2d 100644 --- a/dlls/ns/utils.cpp +++ b/dlls/ns/utils.cpp @@ -1,35 +1,15 @@ -/* AMX Mod X - * Natural Selection Module - * - * by the AMX Mod X Development Team - * - * This file is part of AMX Mod X. - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection Module +// #include "sdk/amxxmodule.h" diff --git a/dlls/nvault/Binary.cpp b/dlls/nvault/Binary.cpp index 0ef4c728..06dd7d3e 100755 --- a/dlls/nvault/Binary.cpp +++ b/dlls/nvault/Binary.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// NVault Module +// + #include "Binary.h" #include "amxxmodule.h" diff --git a/dlls/nvault/Binary.h b/dlls/nvault/Binary.h index d5c0a030..adb57752 100755 --- a/dlls/nvault/Binary.h +++ b/dlls/nvault/Binary.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// NVault Module +// + #ifndef _INCLUDE_BINARY_H #define _INCLUDE_BINARY_H diff --git a/dlls/nvault/IVault.h b/dlls/nvault/IVault.h index 80d14d3f..0533506b 100755 --- a/dlls/nvault/IVault.h +++ b/dlls/nvault/IVault.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// NVault Module +// + #ifndef _INCLUDE_IVAULT_H #define _INCLUDE_IVAULT_H diff --git a/dlls/nvault/Journal.cpp b/dlls/nvault/Journal.cpp index c980fb2d..dcc08982 100755 --- a/dlls/nvault/Journal.cpp +++ b/dlls/nvault/Journal.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// NVault Module +// + #include #include #if defined(__linux__) || defined(__APPLE__) diff --git a/dlls/nvault/Journal.h b/dlls/nvault/Journal.h index cf6c6b91..afa49706 100755 --- a/dlls/nvault/Journal.h +++ b/dlls/nvault/Journal.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// NVault Module +// + #ifndef _INCLUDE_JOURNAL_H #define _INCLUDE_JOURNAL_H diff --git a/dlls/nvault/NVault.cpp b/dlls/nvault/NVault.cpp index 4546f02c..95517fbb 100755 --- a/dlls/nvault/NVault.cpp +++ b/dlls/nvault/NVault.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// NVault Module +// + #include #include "amxxmodule.h" #include "NVault.h" diff --git a/dlls/nvault/NVault.h b/dlls/nvault/NVault.h index 4d08dac5..291018d2 100755 --- a/dlls/nvault/NVault.h +++ b/dlls/nvault/NVault.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// NVault Module +// + #ifndef _INCLUDE_NVAULT_H #define _INCLUDE_NVAULT_H diff --git a/dlls/nvault/amxxapi.cpp b/dlls/nvault/amxxapi.cpp index 880e9dd8..1621aa60 100755 --- a/dlls/nvault/amxxapi.cpp +++ b/dlls/nvault/amxxapi.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// NVault Module +// + #include #include "amxxapi.h" #include "NVault.h" diff --git a/dlls/nvault/amxxapi.h b/dlls/nvault/amxxapi.h index 0190d84f..ebda0750 100755 --- a/dlls/nvault/amxxapi.h +++ b/dlls/nvault/amxxapi.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// NVault Module +// + #ifndef _INCLUDE_AMXXAPI_H #define _INCLUDE_AMXXAPI_H diff --git a/dlls/nvault/compat.h b/dlls/nvault/compat.h index 70f6de80..33faca47 100755 --- a/dlls/nvault/compat.h +++ b/dlls/nvault/compat.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// NVault Module +// + #ifndef _INCLUDE_COMPAT_H #define _INCLUDE_COMPAT_H diff --git a/dlls/nvault/sdk/CQueue.h b/dlls/nvault/sdk/CQueue.h index 44285185..f45abffc 100755 --- a/dlls/nvault/sdk/CQueue.h +++ b/dlls/nvault/sdk/CQueue.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license //by David "BAILOPAN" Anderson #ifndef _INCLUDE_CQUEUE_H diff --git a/dlls/nvault/sdk/CString.h b/dlls/nvault/sdk/CString.h index 1c2c5789..9f9b63f3 100755 --- a/dlls/nvault/sdk/CString.h +++ b/dlls/nvault/sdk/CString.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef _INCLUDE_CSTRING_H #define _INCLUDE_CSTRING_H diff --git a/dlls/nvault/sdk/CVector.h b/dlls/nvault/sdk/CVector.h index 24355d4e..44241413 100755 --- a/dlls/nvault/sdk/CVector.h +++ b/dlls/nvault/sdk/CVector.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef __CVECTOR_H__ #define __CVECTOR_H__ diff --git a/dlls/nvault/sdk/amxxmodule.cpp b/dlls/nvault/sdk/amxxmodule.cpp index efb933b3..7de02e6e 100755 --- a/dlls/nvault/sdk/amxxmodule.cpp +++ b/dlls/nvault/sdk/amxxmodule.cpp @@ -1,36 +1,16 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* Parts Copyright (C) 2001-2003 Will Day -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -* -* Description: AMX Mod X Module Interface Functions -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Parts Copyright (C) 2001-2003 Will Day +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module SDK +// #include #include diff --git a/dlls/nvault/sdk/amxxmodule.h b/dlls/nvault/sdk/amxxmodule.h index 3ca8c7b6..6a760b25 100755 --- a/dlls/nvault/sdk/amxxmodule.h +++ b/dlls/nvault/sdk/amxxmodule.h @@ -1,7 +1,16 @@ -/* - * AMX Mod X Module Interface Functions - * This file may be freely used -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license +// + +// +// Module SDK +// // prevent double include #ifndef __AMXXMODULE_H__ diff --git a/dlls/nvault/sdk/moduleconfig.h b/dlls/nvault/sdk/moduleconfig.h index 31d9818a..c51caa22 100755 --- a/dlls/nvault/sdk/moduleconfig.h +++ b/dlls/nvault/sdk/moduleconfig.h @@ -1,4 +1,15 @@ -// Configuration +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module Config +// #ifndef __MODULECONFIG_H__ #define __MODULECONFIG_H__ diff --git a/dlls/regex/CRegEx.cpp b/dlls/regex/CRegEx.cpp index 47dab64a..d98b1241 100755 --- a/dlls/regex/CRegEx.cpp +++ b/dlls/regex/CRegEx.cpp @@ -1,35 +1,16 @@ -/* AMX Mod X - * Regular Expressions Module - * - * by the AMX Mod X Development Team - * - * This file is part of AMX Mod X. - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Regular Expressions Module +// + #include "amxxmodule.h" #include "pcre.h" #include "CRegEx.h" diff --git a/dlls/regex/CRegEx.h b/dlls/regex/CRegEx.h index 82db0311..efd0d91f 100755 --- a/dlls/regex/CRegEx.h +++ b/dlls/regex/CRegEx.h @@ -1,35 +1,16 @@ -/* AMX Mod X - * Regular Expressions Module - * - * by the AMX Mod X Development Team - * - * This file is part of AMX Mod X. - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Regular Expressions Module +// + #ifndef _INCLUDE_CREGEX_H #define _INCLUDE_CREGEX_H diff --git a/dlls/regex/module.cpp b/dlls/regex/module.cpp index 78182c97..b62c4d4d 100755 --- a/dlls/regex/module.cpp +++ b/dlls/regex/module.cpp @@ -1,35 +1,16 @@ -/* AMX Mod X - * Regular Expressions Module - * - * by the AMX Mod X Development Team - * - * This file is part of AMX Mod X. - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Regular Expressions Module +// + #include #include "pcre.h" #include "amxxmodule.h" diff --git a/dlls/regex/sdk/CVector.h b/dlls/regex/sdk/CVector.h index 24355d4e..44241413 100755 --- a/dlls/regex/sdk/CVector.h +++ b/dlls/regex/sdk/CVector.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef __CVECTOR_H__ #define __CVECTOR_H__ diff --git a/dlls/regex/sdk/amxxmodule.cpp b/dlls/regex/sdk/amxxmodule.cpp index efb933b3..7de02e6e 100755 --- a/dlls/regex/sdk/amxxmodule.cpp +++ b/dlls/regex/sdk/amxxmodule.cpp @@ -1,36 +1,16 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* Parts Copyright (C) 2001-2003 Will Day -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -* -* Description: AMX Mod X Module Interface Functions -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Parts Copyright (C) 2001-2003 Will Day +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module SDK +// #include #include diff --git a/dlls/regex/sdk/amxxmodule.h b/dlls/regex/sdk/amxxmodule.h index 3ca8c7b6..6a760b25 100755 --- a/dlls/regex/sdk/amxxmodule.h +++ b/dlls/regex/sdk/amxxmodule.h @@ -1,7 +1,16 @@ -/* - * AMX Mod X Module Interface Functions - * This file may be freely used -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license +// + +// +// Module SDK +// // prevent double include #ifndef __AMXXMODULE_H__ diff --git a/dlls/regex/sdk/moduleconfig.h b/dlls/regex/sdk/moduleconfig.h index 60bfca55..f7f0dc4a 100755 --- a/dlls/regex/sdk/moduleconfig.h +++ b/dlls/regex/sdk/moduleconfig.h @@ -1,4 +1,15 @@ -// Configuration +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module Config +// #ifndef __MODULECONFIG_H__ #define __MODULECONFIG_H__ diff --git a/dlls/regex/utils.cpp b/dlls/regex/utils.cpp index 3ae8c085..f5148b3d 100644 --- a/dlls/regex/utils.cpp +++ b/dlls/regex/utils.cpp @@ -1,3 +1,15 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Regular Expressions Module +// #include "amxxmodule.h" #include @@ -238,4 +250,4 @@ char *UTIL_ReplaceEx(char *subject, size_t maxLen, const char *search, size_t se } return NULL; -} \ No newline at end of file +} diff --git a/dlls/regex/utils.h b/dlls/regex/utils.h index 05644312..bf4c7c84 100644 --- a/dlls/regex/utils.h +++ b/dlls/regex/utils.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Regular Expressions Module +// + #ifndef UTILS_H #define UTILS_H @@ -5,4 +18,4 @@ int UTIL_CheckValidChar(char *c); char *UTIL_ReplaceEx(char *subject, size_t maxLen, const char *search, size_t searchLen, const char *replace, size_t replaceLen, bool caseSensitive); unsigned int strncopy(char *dest, const char *src, size_t count); -#endif // UTILS_H \ No newline at end of file +#endif // UTILS_H diff --git a/dlls/sockets/sdk/amxxmodule.cpp b/dlls/sockets/sdk/amxxmodule.cpp index efb933b3..7de02e6e 100755 --- a/dlls/sockets/sdk/amxxmodule.cpp +++ b/dlls/sockets/sdk/amxxmodule.cpp @@ -1,36 +1,16 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* Parts Copyright (C) 2001-2003 Will Day -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -* -* Description: AMX Mod X Module Interface Functions -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Parts Copyright (C) 2001-2003 Will Day +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module SDK +// #include #include diff --git a/dlls/sockets/sdk/amxxmodule.h b/dlls/sockets/sdk/amxxmodule.h index 3ca8c7b6..6a760b25 100755 --- a/dlls/sockets/sdk/amxxmodule.h +++ b/dlls/sockets/sdk/amxxmodule.h @@ -1,7 +1,16 @@ -/* - * AMX Mod X Module Interface Functions - * This file may be freely used -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license +// + +// +// Module SDK +// // prevent double include #ifndef __AMXXMODULE_H__ diff --git a/dlls/sockets/sdk/moduleconfig.h b/dlls/sockets/sdk/moduleconfig.h index 10c55440..85dbea26 100755 --- a/dlls/sockets/sdk/moduleconfig.h +++ b/dlls/sockets/sdk/moduleconfig.h @@ -1,4 +1,15 @@ -// Configuration +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module Config +// #ifndef __MODULECONFIG_H__ #define __MODULECONFIG_H__ diff --git a/dlls/sockets/sockets.cpp b/dlls/sockets/sockets.cpp index bc5eed88..2ff14e4c 100755 --- a/dlls/sockets/sockets.cpp +++ b/dlls/sockets/sockets.cpp @@ -1,19 +1,19 @@ -/* - * - * AMX Mod X Module - * Basic Socket Functions - * - * Codebase from Ivan, -g-s-ivan@web.de (AMX 0.9.3) - * Modification by Olaf Reusch, kenterfie@hlsw.de (AMXX 0.16, AMX 0.96) - * Modification by David Anderson, dvander@tcwonline.org (AMXx 0.20) - * - * Bugs/Fixes - * - * v0.1 - * - code structure renewed - * v0.2 - * - added socket_send2 to send data containing null bytes (FALUCO)(AMXX v1.65) - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// Codebase from Ivan, -g-s-ivan@web.de (AMX 0.9.3) +// Modification by Olaf Reusch, kenterfie@hlsw.de (AMXX 0.16, AMX 0.96) +// Modification by David Anderson, dvander@tcwonline.org (AMXx 0.20) +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Sockets Module +// #include #include diff --git a/dlls/sqlite/basic_sql.cpp b/dlls/sqlite/basic_sql.cpp index a969572d..4d606c62 100644 --- a/dlls/sqlite/basic_sql.cpp +++ b/dlls/sqlite/basic_sql.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// SQLite Module +// + #include #include "sh_list.h" #include "sqlite_header.h" diff --git a/dlls/sqlite/handles.cpp b/dlls/sqlite/handles.cpp index 596991b1..e418a0f6 100644 --- a/dlls/sqlite/handles.cpp +++ b/dlls/sqlite/handles.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// SQLite Module +// + #include #include "sh_stack.h" #include "CVector.h" diff --git a/dlls/sqlite/module.cpp b/dlls/sqlite/module.cpp index f359ed67..7fb83cd8 100644 --- a/dlls/sqlite/module.cpp +++ b/dlls/sqlite/module.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// SQLite Module +// + #include "amxxmodule.h" #include "sqlite_header.h" #include "sqlheaders.h" diff --git a/dlls/sqlite/oldcompat_sql.cpp b/dlls/sqlite/oldcompat_sql.cpp index 0dbbb77c..0c2c6b6f 100644 --- a/dlls/sqlite/oldcompat_sql.cpp +++ b/dlls/sqlite/oldcompat_sql.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// SQLite Module +// + #include #include "sh_list.h" #include "sqlite_header.h" diff --git a/dlls/sqlite/sdk/CVector.h b/dlls/sqlite/sdk/CVector.h index 24355d4e..44241413 100755 --- a/dlls/sqlite/sdk/CVector.h +++ b/dlls/sqlite/sdk/CVector.h @@ -1,33 +1,11 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #ifndef __CVECTOR_H__ #define __CVECTOR_H__ diff --git a/dlls/sqlite/sdk/amxxmodule.cpp b/dlls/sqlite/sdk/amxxmodule.cpp index efb933b3..7de02e6e 100755 --- a/dlls/sqlite/sdk/amxxmodule.cpp +++ b/dlls/sqlite/sdk/amxxmodule.cpp @@ -1,36 +1,16 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* Parts Copyright (C) 2001-2003 Will Day -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -* -* Description: AMX Mod X Module Interface Functions -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Parts Copyright (C) 2001-2003 Will Day +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module SDK +// #include #include diff --git a/dlls/sqlite/sdk/amxxmodule.h b/dlls/sqlite/sdk/amxxmodule.h index 3ca8c7b6..6a760b25 100755 --- a/dlls/sqlite/sdk/amxxmodule.h +++ b/dlls/sqlite/sdk/amxxmodule.h @@ -1,7 +1,16 @@ -/* - * AMX Mod X Module Interface Functions - * This file may be freely used -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license +// + +// +// Module SDK +// // prevent double include #ifndef __AMXXMODULE_H__ diff --git a/dlls/sqlite/sdk/moduleconfig.h b/dlls/sqlite/sdk/moduleconfig.h index 9e9a2b45..7250a93b 100755 --- a/dlls/sqlite/sdk/moduleconfig.h +++ b/dlls/sqlite/sdk/moduleconfig.h @@ -1,4 +1,15 @@ -// Configuration +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module Config +// #ifndef __MODULECONFIG_H__ #define __MODULECONFIG_H__ diff --git a/dlls/sqlite/sqlheaders.h b/dlls/sqlite/sqlheaders.h index c09f108f..106d5828 100644 --- a/dlls/sqlite/sqlheaders.h +++ b/dlls/sqlite/sqlheaders.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// SQLite Module +// + #ifndef _INCLUDE_SQLHEADERS_H #define _INCLUDE_SQLHEADERS_H diff --git a/dlls/sqlite/sqlite_header.h b/dlls/sqlite/sqlite_header.h index fa70ea2d..16a675b2 100644 --- a/dlls/sqlite/sqlite_header.h +++ b/dlls/sqlite/sqlite_header.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// SQLite Module +// + #ifndef _INCLUDE_AMXMODX_MYSQL2_HEADER_H #define _INCLUDE_AMXMODX_MYSQL2_HEADER_H diff --git a/dlls/sqlite/sqlitepp/ISQLDriver.h b/dlls/sqlite/sqlitepp/ISQLDriver.h index a5c20f11..b949a59a 100644 --- a/dlls/sqlite/sqlitepp/ISQLDriver.h +++ b/dlls/sqlite/sqlitepp/ISQLDriver.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// SQLite Module +// + #ifndef _INCLUDE_SOURCEMOD_DATABASE2_H #define _INCLUDE_SOURCEMOD_DATABASE2_H diff --git a/dlls/sqlite/sqlitepp/SqliteDatabase.cpp b/dlls/sqlite/sqlitepp/SqliteDatabase.cpp index f764174b..b926e98e 100644 --- a/dlls/sqlite/sqlitepp/SqliteDatabase.cpp +++ b/dlls/sqlite/sqlitepp/SqliteDatabase.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// SQLite Module +// + #include #include #include "SqliteDriver.h" diff --git a/dlls/sqlite/sqlitepp/SqliteDatabase.h b/dlls/sqlite/sqlitepp/SqliteDatabase.h index 2b11f0c4..65ac4ad9 100644 --- a/dlls/sqlite/sqlitepp/SqliteDatabase.h +++ b/dlls/sqlite/sqlitepp/SqliteDatabase.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// SQLite Module +// + #ifndef _INCLUDE_SOURCEMOD_SQLITE_DATABASE_H #define _INCLUDE_SOURCEMOD_SQLITE_DATABASE_H diff --git a/dlls/sqlite/sqlitepp/SqliteDriver.cpp b/dlls/sqlite/sqlitepp/SqliteDriver.cpp index 9e41cd75..ab60b921 100644 --- a/dlls/sqlite/sqlitepp/SqliteDriver.cpp +++ b/dlls/sqlite/sqlitepp/SqliteDriver.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// SQLite Module +// + #include #include #include "SqliteHeaders.h" diff --git a/dlls/sqlite/sqlitepp/SqliteDriver.h b/dlls/sqlite/sqlitepp/SqliteDriver.h index 5c2160a7..18cf7156 100644 --- a/dlls/sqlite/sqlitepp/SqliteDriver.h +++ b/dlls/sqlite/sqlitepp/SqliteDriver.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// SQLite Module +// + #ifndef _INCLUDE_SOURCEMOD_SQLITE_DRIVER_H #define _INCLUDE_SOURCEMOD_SQLITE_DRIVER_H diff --git a/dlls/sqlite/sqlitepp/SqliteHeaders.h b/dlls/sqlite/sqlitepp/SqliteHeaders.h index 650b78cd..5599d27f 100644 --- a/dlls/sqlite/sqlitepp/SqliteHeaders.h +++ b/dlls/sqlite/sqlitepp/SqliteHeaders.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// SQLite Module +// + #ifndef _INCLUDE_SOURCEMOD_SQLITE_HEADERS_H #define _INCLUDE_SOURCEMOD_SQLITE_HEADERS_H diff --git a/dlls/sqlite/sqlitepp/SqliteQuery.cpp b/dlls/sqlite/sqlitepp/SqliteQuery.cpp index 0a7439f7..61e3e19e 100644 --- a/dlls/sqlite/sqlitepp/SqliteQuery.cpp +++ b/dlls/sqlite/sqlitepp/SqliteQuery.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// SQLite Module +// + #include #include #include "SqliteQuery.h" diff --git a/dlls/sqlite/sqlitepp/SqliteQuery.h b/dlls/sqlite/sqlitepp/SqliteQuery.h index c15bcfc9..b5325348 100644 --- a/dlls/sqlite/sqlitepp/SqliteQuery.h +++ b/dlls/sqlite/sqlitepp/SqliteQuery.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// SQLite Module +// + #ifndef _INCLUDE_SOURCEMOD_SQLITE_QUERY_H #define _INCLUDE_SOURCEMOD_SQLITE_QUERY_H diff --git a/dlls/sqlite/sqlitepp/SqliteResultSet.cpp b/dlls/sqlite/sqlitepp/SqliteResultSet.cpp index 3cc81bd7..41935e34 100644 --- a/dlls/sqlite/sqlitepp/SqliteResultSet.cpp +++ b/dlls/sqlite/sqlitepp/SqliteResultSet.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// SQLite Module +// + #include #include #include "SqliteResultSet.h" diff --git a/dlls/sqlite/sqlitepp/SqliteResultSet.h b/dlls/sqlite/sqlitepp/SqliteResultSet.h index 18735c74..9cc05828 100644 --- a/dlls/sqlite/sqlitepp/SqliteResultSet.h +++ b/dlls/sqlite/sqlitepp/SqliteResultSet.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// SQLite Module +// + #ifndef _INCLUDE_SOURCEMOD_SQLITE_RESULTSET_H #define _INCLUDE_SOURCEMOD_SQLITE_RESULTSET_H diff --git a/dlls/sqlite/thread/BaseWorker.cpp b/dlls/sqlite/thread/BaseWorker.cpp index 4e107f92..f02758a4 100644 --- a/dlls/sqlite/thread/BaseWorker.cpp +++ b/dlls/sqlite/thread/BaseWorker.cpp @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include "BaseWorker.h" BaseWorker::BaseWorker() : diff --git a/dlls/sqlite/thread/BaseWorker.h b/dlls/sqlite/thread/BaseWorker.h index 37b8f5fd..b2a218cf 100644 --- a/dlls/sqlite/thread/BaseWorker.h +++ b/dlls/sqlite/thread/BaseWorker.h @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #ifndef _INCLUDE_SOURCEMOD_BASEWORKER_H #define _INCLUDE_SOURCEMOD_BASEWORKER_H diff --git a/dlls/sqlite/thread/IThreader.h b/dlls/sqlite/thread/IThreader.h index f9c3e8a2..b27673d2 100644 --- a/dlls/sqlite/thread/IThreader.h +++ b/dlls/sqlite/thread/IThreader.h @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #ifndef _INCLUDE_SOURCEMOD_THREADER_H #define _INCLUDE_SOURCEMOD_THREADER_H diff --git a/dlls/sqlite/thread/PosixThreads.cpp b/dlls/sqlite/thread/PosixThreads.cpp index 47d66899..1e112739 100644 --- a/dlls/sqlite/thread/PosixThreads.cpp +++ b/dlls/sqlite/thread/PosixThreads.cpp @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include #include "PosixThreads.h" diff --git a/dlls/sqlite/thread/PosixThreads.h b/dlls/sqlite/thread/PosixThreads.h index 95245d79..15ed6f97 100644 --- a/dlls/sqlite/thread/PosixThreads.h +++ b/dlls/sqlite/thread/PosixThreads.h @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #ifndef _INCLUDE_POSIXTHREADS_H_ #define _INCLUDE_POSIXTHREADS_H_ diff --git a/dlls/sqlite/thread/ThreadSupport.h b/dlls/sqlite/thread/ThreadSupport.h index b15b0d30..c69f9d40 100644 --- a/dlls/sqlite/thread/ThreadSupport.h +++ b/dlls/sqlite/thread/ThreadSupport.h @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #ifndef _INCLUDE_SOURCEMOD_THREAD_SUPPORT_H #define _INCLUDE_SOURCEMOD_THREAD_SUPPORT_H diff --git a/dlls/sqlite/thread/ThreadWorker.cpp b/dlls/sqlite/thread/ThreadWorker.cpp index 4c061067..a2393949 100644 --- a/dlls/sqlite/thread/ThreadWorker.cpp +++ b/dlls/sqlite/thread/ThreadWorker.cpp @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include "ThreadWorker.h" ThreadWorker::ThreadWorker() : diff --git a/dlls/sqlite/thread/ThreadWorker.h b/dlls/sqlite/thread/ThreadWorker.h index a8c57be3..9b66bc38 100644 --- a/dlls/sqlite/thread/ThreadWorker.h +++ b/dlls/sqlite/thread/ThreadWorker.h @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #ifndef _INCLUDE_SOURCEMOD_THREADWORKER_H #define _INCLUDE_SOURCEMOD_THREADWORKER_H diff --git a/dlls/sqlite/thread/WinThreads.cpp b/dlls/sqlite/thread/WinThreads.cpp index 6f3f436f..6be2346f 100644 --- a/dlls/sqlite/thread/WinThreads.cpp +++ b/dlls/sqlite/thread/WinThreads.cpp @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include "WinThreads.h" void WinThreader::ThreadSleep(unsigned int ms) diff --git a/dlls/sqlite/thread/WinThreads.h b/dlls/sqlite/thread/WinThreads.h index 4bec6fd3..574fa2ec 100644 --- a/dlls/sqlite/thread/WinThreads.h +++ b/dlls/sqlite/thread/WinThreads.h @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #ifndef _INCLUDE_WINTHREADS_H_ #define _INCLUDE_WINTHREADS_H_ diff --git a/dlls/sqlite/threading.cpp b/dlls/sqlite/threading.cpp index b7a852a1..f80350c8 100644 --- a/dlls/sqlite/threading.cpp +++ b/dlls/sqlite/threading.cpp @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// SQLite Module +// + #include "amxxmodule.h" #include "sqlite_header.h" #include "threading.h" diff --git a/dlls/sqlite/threading.h b/dlls/sqlite/threading.h index e5c62ed9..a3c640c7 100644 --- a/dlls/sqlite/threading.h +++ b/dlls/sqlite/threading.h @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// SQLite Module +// + #ifndef _INCLUDE_MYSQL_THREADING_H #define _INCLUDE_MYSQL_THREADING_H diff --git a/dlls/tfcx/CMisc.cpp b/dlls/tfcx/CMisc.cpp index 44641183..82cc1aee 100755 --- a/dlls/tfcx/CMisc.cpp +++ b/dlls/tfcx/CMisc.cpp @@ -1,33 +1,16 @@ -/* - * TFCX - * Copyright (c) 2004 Lukasz Wlasinski - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TFCX Module +// #include "amxxmodule.h" #include "CMisc.h" diff --git a/dlls/tfcx/CMisc.h b/dlls/tfcx/CMisc.h index fc24a2f6..2b1e9b0a 100755 --- a/dlls/tfcx/CMisc.h +++ b/dlls/tfcx/CMisc.h @@ -1,4 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license +// +// TFCX Module +// #ifndef CMISC_H #define CMISC_H diff --git a/dlls/tfcx/CRank.cpp b/dlls/tfcx/CRank.cpp index 9cb39e53..5276bcec 100755 --- a/dlls/tfcx/CRank.cpp +++ b/dlls/tfcx/CRank.cpp @@ -1,33 +1,16 @@ -/* - * TFCX - * Copyright (c) 2004 Lukasz Wlasinski - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TFCX Module +// #include "amxxmodule.h" #include "CRank.h" diff --git a/dlls/tfcx/CRank.h b/dlls/tfcx/CRank.h index a7e8f884..575e9d42 100755 --- a/dlls/tfcx/CRank.h +++ b/dlls/tfcx/CRank.h @@ -1,4 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license +// +// TFCX Module +// #ifndef CRANK_H #define CRANK_H diff --git a/dlls/tfcx/NBase.cpp b/dlls/tfcx/NBase.cpp index 786f3d2e..bc7d2251 100755 --- a/dlls/tfcx/NBase.cpp +++ b/dlls/tfcx/NBase.cpp @@ -1,33 +1,16 @@ -/* - * TFCX - * Copyright (c) 2004 Lukasz Wlasinski - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TFCX Module +// #include "amxxmodule.h" #include "tfcx.h" diff --git a/dlls/tfcx/NRank.cpp b/dlls/tfcx/NRank.cpp index 2c57ebf5..a81f3af4 100755 --- a/dlls/tfcx/NRank.cpp +++ b/dlls/tfcx/NRank.cpp @@ -1,34 +1,16 @@ -/* - * TFCX - * Copyright (c) 2004 Lukasz Wlasinski - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license +// +// TFCX Module +// #include "amxxmodule.h" #include "tfcx.h" diff --git a/dlls/tfcx/Utils.cpp b/dlls/tfcx/Utils.cpp index e8f504e0..10374b8b 100755 --- a/dlls/tfcx/Utils.cpp +++ b/dlls/tfcx/Utils.cpp @@ -1,33 +1,16 @@ -/* - * TFCX - * Copyright (c) 2004 Lukasz Wlasinski - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TFCX Module +// #include "amxxmodule.h" #include "tfcx.h" diff --git a/dlls/tfcx/moduleconfig.cpp b/dlls/tfcx/moduleconfig.cpp index c958188d..0fff9b90 100755 --- a/dlls/tfcx/moduleconfig.cpp +++ b/dlls/tfcx/moduleconfig.cpp @@ -1,33 +1,16 @@ -/* - * TFCX - * Copyright (c) 2004 Lukasz Wlasinski - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TFCX Module +// #include "tfcx.h" diff --git a/dlls/tfcx/sdk/amxxmodule.cpp b/dlls/tfcx/sdk/amxxmodule.cpp index efb933b3..7de02e6e 100755 --- a/dlls/tfcx/sdk/amxxmodule.cpp +++ b/dlls/tfcx/sdk/amxxmodule.cpp @@ -1,36 +1,16 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* Parts Copyright (C) 2001-2003 Will Day -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -* -* Description: AMX Mod X Module Interface Functions -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Parts Copyright (C) 2001-2003 Will Day +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module SDK +// #include #include diff --git a/dlls/tfcx/sdk/amxxmodule.h b/dlls/tfcx/sdk/amxxmodule.h index 3ca8c7b6..6a760b25 100755 --- a/dlls/tfcx/sdk/amxxmodule.h +++ b/dlls/tfcx/sdk/amxxmodule.h @@ -1,7 +1,16 @@ -/* - * AMX Mod X Module Interface Functions - * This file may be freely used -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license +// + +// +// Module SDK +// // prevent double include #ifndef __AMXXMODULE_H__ diff --git a/dlls/tfcx/sdk/moduleconfig.h b/dlls/tfcx/sdk/moduleconfig.h index f4074df3..320c8e4a 100755 --- a/dlls/tfcx/sdk/moduleconfig.h +++ b/dlls/tfcx/sdk/moduleconfig.h @@ -1,4 +1,16 @@ -// Configuration +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module Config +// #ifndef __MODULECONFIG_H__ #define __MODULECONFIG_H__ diff --git a/dlls/tfcx/tfcx.h b/dlls/tfcx/tfcx.h index 0d947bbe..54944611 100755 --- a/dlls/tfcx/tfcx.h +++ b/dlls/tfcx/tfcx.h @@ -1,33 +1,16 @@ -/* - * TFCX - * Copyright (c) 2004 Lukasz Wlasinski - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TFCX Module +// #ifndef RANK_H #define RANK_H diff --git a/dlls/tfcx/usermsg.cpp b/dlls/tfcx/usermsg.cpp index 0bf64bc8..e3d84571 100755 --- a/dlls/tfcx/usermsg.cpp +++ b/dlls/tfcx/usermsg.cpp @@ -1,33 +1,16 @@ -/* - * TFCX - * Copyright (c) 2004 Lukasz Wlasinski - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TFCX Module +// #include "amxxmodule.h" #include "tfcx.h" diff --git a/dlls/ts/tsfun/sdk/amxxmodule.cpp b/dlls/ts/tsfun/sdk/amxxmodule.cpp index efb933b3..7de02e6e 100755 --- a/dlls/ts/tsfun/sdk/amxxmodule.cpp +++ b/dlls/ts/tsfun/sdk/amxxmodule.cpp @@ -1,36 +1,16 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* Parts Copyright (C) 2001-2003 Will Day -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -* -* Description: AMX Mod X Module Interface Functions -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Parts Copyright (C) 2001-2003 Will Day +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module SDK +// #include #include diff --git a/dlls/ts/tsfun/sdk/amxxmodule.h b/dlls/ts/tsfun/sdk/amxxmodule.h index 3ca8c7b6..6a760b25 100755 --- a/dlls/ts/tsfun/sdk/amxxmodule.h +++ b/dlls/ts/tsfun/sdk/amxxmodule.h @@ -1,7 +1,16 @@ -/* - * AMX Mod X Module Interface Functions - * This file may be freely used -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license +// + +// +// Module SDK +// // prevent double include #ifndef __AMXXMODULE_H__ diff --git a/dlls/ts/tsfun/sdk/moduleconfig.h b/dlls/ts/tsfun/sdk/moduleconfig.h index cc1c5fb4..c3ca7103 100755 --- a/dlls/ts/tsfun/sdk/moduleconfig.h +++ b/dlls/ts/tsfun/sdk/moduleconfig.h @@ -1,4 +1,16 @@ -// Configuration +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Parts Copyright (C) 2001-2003 Will Day +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module Config +// #ifndef __MODULECONFIG_H__ #define __MODULECONFIG_H__ diff --git a/dlls/ts/tsx/CMisc.cpp b/dlls/ts/tsx/CMisc.cpp index 5dde272a..fed2c32e 100755 --- a/dlls/ts/tsx/CMisc.cpp +++ b/dlls/ts/tsx/CMisc.cpp @@ -1,33 +1,16 @@ -/* - * Copyright (c) 2003-2004 Lukasz Wlasinski - * - * This file is part of TS XMod. - * - * TS XMod is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * TS XMod is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with TS XMod; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TSX Module +// #include "CMisc.h" #include "tsx.h" diff --git a/dlls/ts/tsx/CMisc.h b/dlls/ts/tsx/CMisc.h index d8d0560a..51e922fc 100755 --- a/dlls/ts/tsx/CMisc.h +++ b/dlls/ts/tsx/CMisc.h @@ -1,33 +1,16 @@ -/* - * Copyright (c) 2003-2004 Lukasz Wlasinski - * - * This file is part of TS XMod. - * - * TS XMod is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * TS XMod is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with TS XMod; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TSX Module +// #ifndef CMISC_H #define CMISC_H diff --git a/dlls/ts/tsx/CRank.cpp b/dlls/ts/tsx/CRank.cpp index d088c637..0a439788 100755 --- a/dlls/ts/tsx/CRank.cpp +++ b/dlls/ts/tsx/CRank.cpp @@ -1,33 +1,16 @@ -/* - * TSX - * Copyright (c) 2004 Lukasz Wlasinski - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TSX Module +// #include "amxxmodule.h" #include "CRank.h" diff --git a/dlls/ts/tsx/CRank.h b/dlls/ts/tsx/CRank.h index 39595b13..149796b0 100755 --- a/dlls/ts/tsx/CRank.h +++ b/dlls/ts/tsx/CRank.h @@ -1,4 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license +// +// TSX Module +// #ifndef CRANK_H #define CRANK_H diff --git a/dlls/ts/tsx/NBase.cpp b/dlls/ts/tsx/NBase.cpp index f6f7915a..cb08c2e4 100755 --- a/dlls/ts/tsx/NBase.cpp +++ b/dlls/ts/tsx/NBase.cpp @@ -1,33 +1,16 @@ -/* - * Copyright (c) 2003-2004 Lukasz Wlasinski - * - * This file is part of TS XMod. - * - * TS XMod is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * TS XMod is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with TS XMod; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TSX Module +// #include "amxxmodule.h" #include "tsx.h" diff --git a/dlls/ts/tsx/NRank.cpp b/dlls/ts/tsx/NRank.cpp index c62ea8ce..64ba7611 100755 --- a/dlls/ts/tsx/NRank.cpp +++ b/dlls/ts/tsx/NRank.cpp @@ -1,34 +1,16 @@ -/* - * TFCX - * Copyright (c) 2004 Lukasz Wlasinski - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license +// +// TSX Module +// #include "amxxmodule.h" #include "tsx.h" diff --git a/dlls/ts/tsx/Utils.cpp b/dlls/ts/tsx/Utils.cpp index dd2ec6a6..783f23f2 100755 --- a/dlls/ts/tsx/Utils.cpp +++ b/dlls/ts/tsx/Utils.cpp @@ -1,33 +1,16 @@ -/* - * TFCX - * Copyright (c) 2004 Lukasz Wlasinski - * - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TSX Module +// #include "amxxmodule.h" #include "tsx.h" diff --git a/dlls/ts/tsx/moduleconfig.cpp b/dlls/ts/tsx/moduleconfig.cpp index 6a7f0460..158d1789 100755 --- a/dlls/ts/tsx/moduleconfig.cpp +++ b/dlls/ts/tsx/moduleconfig.cpp @@ -1,33 +1,16 @@ -/* - * Copyright (c) 2003-2004 Lukasz Wlasinski - * - * This file is part of TS XMod. - * - * TS XMod is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * TS XMod is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with TS XMod; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TSX Module +// #include "tsx.h" diff --git a/dlls/ts/tsx/sdk/amxxmodule.cpp b/dlls/ts/tsx/sdk/amxxmodule.cpp index efb933b3..7de02e6e 100755 --- a/dlls/ts/tsx/sdk/amxxmodule.cpp +++ b/dlls/ts/tsx/sdk/amxxmodule.cpp @@ -1,36 +1,16 @@ -/* AMX Mod X -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* Parts Copyright (C) 2001-2003 Will Day -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -* -* Description: AMX Mod X Module Interface Functions -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Parts Copyright (C) 2001-2003 Will Day +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module SDK +// #include #include diff --git a/dlls/ts/tsx/sdk/amxxmodule.h b/dlls/ts/tsx/sdk/amxxmodule.h index 3ca8c7b6..6a760b25 100755 --- a/dlls/ts/tsx/sdk/amxxmodule.h +++ b/dlls/ts/tsx/sdk/amxxmodule.h @@ -1,7 +1,16 @@ -/* - * AMX Mod X Module Interface Functions - * This file may be freely used -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license +// + +// +// Module SDK +// // prevent double include #ifndef __AMXXMODULE_H__ diff --git a/dlls/ts/tsx/sdk/moduleconfig.h b/dlls/ts/tsx/sdk/moduleconfig.h index 046c8ee2..c1a91352 100755 --- a/dlls/ts/tsx/sdk/moduleconfig.h +++ b/dlls/ts/tsx/sdk/moduleconfig.h @@ -1,4 +1,16 @@ -// Configuration +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Module Config +// #ifndef __MODULECONFIG_H__ #define __MODULECONFIG_H__ diff --git a/dlls/ts/tsx/tsx.h b/dlls/ts/tsx/tsx.h index 186e7d21..2ffa8cc6 100755 --- a/dlls/ts/tsx/tsx.h +++ b/dlls/ts/tsx/tsx.h @@ -1,33 +1,16 @@ -/* - * Copyright (c) 2003-2004 Lukasz Wlasinski - * - * This file is part of TS XMod. - * - * TS XMod is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * TS XMod is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with TS XMod; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TSX Module +// #ifndef TSX_H #define TSX_H diff --git a/dlls/ts/tsx/usermsg.cpp b/dlls/ts/tsx/usermsg.cpp index a3632b61..e194d739 100755 --- a/dlls/ts/tsx/usermsg.cpp +++ b/dlls/ts/tsx/usermsg.cpp @@ -1,33 +1,16 @@ -/* - * Copyright (c) 2003-2004 Lukasz Wlasinski - * - * This file is part of TS XMod. - * - * TS XMod is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * TS XMod is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with TS XMod; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Lukasz Wlasinski. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TSX Module +// #include "amxxmodule.h" #include "tsx.h" diff --git a/plugins/admin.sma b/plugins/admin.sma index 7bfb2362..cb17beda 100755 --- a/plugins/admin.sma +++ b/plugins/admin.sma @@ -1,36 +1,15 @@ -/* AMX Mod X script. -* Admin Base Plugin -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Admin Base Plugin +// // Uncomment for SQL version // #define USING_SQL diff --git a/plugins/adminchat.sma b/plugins/adminchat.sma index 14198996..dfdc9eef 100755 --- a/plugins/adminchat.sma +++ b/plugins/adminchat.sma @@ -1,36 +1,15 @@ -/* AMX Mod X -* Admin Chat Plugin -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Admin Chat Plugin +// #include #include diff --git a/plugins/admincmd.sma b/plugins/admincmd.sma index b233b0d3..a36f5b0c 100755 --- a/plugins/admincmd.sma +++ b/plugins/admincmd.sma @@ -1,36 +1,15 @@ -/* AMX Mod X -* Admin Commands Plugin -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Admin Commands Plugin +// #include #include @@ -654,7 +633,7 @@ public cmdSlap(id, level, cid) public chMap(map[]) { - server_cmd("changelevel %s", map) + change_level(map); } public cmdMap(id, level, cid) diff --git a/plugins/adminhelp.sma b/plugins/adminhelp.sma index 0223c144..6d1caf91 100755 --- a/plugins/adminhelp.sma +++ b/plugins/adminhelp.sma @@ -1,36 +1,15 @@ -/* AMX Mod X -* Admin Help Plugin -* -* by the AMX Mod X Development Team -* originally developed by tcquest78 -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Admin Help Plugin +// #include diff --git a/plugins/adminslots.sma b/plugins/adminslots.sma index 83ce5f27..90eef653 100755 --- a/plugins/adminslots.sma +++ b/plugins/adminslots.sma @@ -1,36 +1,15 @@ -/* AMX Mod X -* Slots Reservation Plugin -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Slots Reservation Plugin +// #include #include diff --git a/plugins/adminvote.sma b/plugins/adminvote.sma index 11633b5b..02917399 100755 --- a/plugins/adminvote.sma +++ b/plugins/adminvote.sma @@ -1,36 +1,15 @@ -/* AMX Mod X -* Admin Votes Plugin -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Admin Votes Plugin +// #include #include diff --git a/plugins/antiflood.sma b/plugins/antiflood.sma index 6d454fc0..2065d3f4 100755 --- a/plugins/antiflood.sma +++ b/plugins/antiflood.sma @@ -1,36 +1,15 @@ -/* AMX Mod X -* Anti Flood Plugin -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Anti Flood Plugin +// #include diff --git a/plugins/cmdmenu.sma b/plugins/cmdmenu.sma index ee77295e..8ec0570d 100755 --- a/plugins/cmdmenu.sma +++ b/plugins/cmdmenu.sma @@ -1,36 +1,15 @@ -/* AMX Mod X -* Commands Menu Plugin -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Commands Menu Plugin +// #include #include diff --git a/plugins/cstrike/csstats.sma b/plugins/cstrike/csstats.sma index d4974488..5c5cf4f2 100755 --- a/plugins/cstrike/csstats.sma +++ b/plugins/cstrike/csstats.sma @@ -1,36 +1,15 @@ -/* AMX Mod X -* Rank Calculation -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Rank Calculation +// /* File location: $moddir/addons/amxmodx/data/csstats.amxx */ diff --git a/plugins/cstrike/miscstats.sma b/plugins/cstrike/miscstats.sma index 2621d790..7f7f39da 100755 --- a/plugins/cstrike/miscstats.sma +++ b/plugins/cstrike/miscstats.sma @@ -1,36 +1,15 @@ -/* AMX Mod X -* Misc. Stats Plugin -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Misc. Stats Plugin +// #include #include diff --git a/plugins/cstrike/restmenu.sma b/plugins/cstrike/restmenu.sma index e1197f13..17980c87 100755 --- a/plugins/cstrike/restmenu.sma +++ b/plugins/cstrike/restmenu.sma @@ -1,36 +1,15 @@ -/* AMX Mod X -* Restrict Weapons Plugin -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Restrict Weapons Plugin +// // Uncomment if you want to have seperate settings for each map //#define MAPSETTINGS diff --git a/plugins/cstrike/stats_logging.sma b/plugins/cstrike/stats_logging.sma index 54f241d6..ddfcf8f2 100755 --- a/plugins/cstrike/stats_logging.sma +++ b/plugins/cstrike/stats_logging.sma @@ -1,36 +1,15 @@ -/* AMX Mod X -* Stats Logging Plugin -* -* by the AMX Mod X Development Team -* originally developed by JustinHoMi -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Stats Logging Plugin +// #include #include diff --git a/plugins/cstrike/statsx.sma b/plugins/cstrike/statsx.sma index 30c0a209..f83ab78f 100755 --- a/plugins/cstrike/statsx.sma +++ b/plugins/cstrike/statsx.sma @@ -1,36 +1,15 @@ - /* AMX Mod X -* StatsX Plugin -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// StatsX Plugin +// //-------------------------------- #include diff --git a/plugins/dod/dodstats.sma b/plugins/dod/dodstats.sma index a6997a58..ebc94f21 100755 --- a/plugins/dod/dodstats.sma +++ b/plugins/dod/dodstats.sma @@ -1,9 +1,18 @@ -/* Get Score for DoD STATS. - * - * (c) 2004, SidLuke - * This file is provided as is (no warranties). - * - * Function calculates position in rank. +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 SidLuke. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// DoD Stats Rank Calculation +// + +/* Function calculates position in rank. * * Stats: * 0 - kills @@ -30,4 +39,4 @@ public get_score(stats[9],body[8]){ DEATHS = 1 return (KILLS-DEATHS-TK)*KILLS/DEATHS -} \ No newline at end of file +} diff --git a/plugins/dod/plmenu.sma b/plugins/dod/plmenu.sma index 31107e8e..1bd3f420 100755 --- a/plugins/dod/plmenu.sma +++ b/plugins/dod/plmenu.sma @@ -1,36 +1,15 @@ -/* AMX Mod X -* Players Menu Plugin -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Players Menu Plugin +// #include #include diff --git a/plugins/dod/stats.sma b/plugins/dod/stats.sma index 117e20d6..43b77717 100755 --- a/plugins/dod/stats.sma +++ b/plugins/dod/stats.sma @@ -1,20 +1,28 @@ -/* AMX Mod script. -* -* (c) 2004, SidLuke -* This file is provided as is (no warranties). -* -* Plugin works with Stats Settings Plugin. Just run both of them. -* By amx_statscfg command (from Stats Settings Plugin) -* you will be able to set all settings and save them to a file. -* -* Example of usage for some options: -* amx_statscfg on SayTop15 -* amx_statscfg on SayRank -* -* Accept able are also parts of name: -* amx_statscfg off say -* amx_statscfg on End -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 SidLuke. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// DoD Stats Plugin +// + +// Plugin works with Stats Settings Plugin. Just run both of them. +// By amx_statscfg command (from Stats Settings Plugin) +// you will be able to set all settings and save them to a file. +// +// Example usage for some options: +// amx_statscfg on SayTop15 +// amx_statscfg on SayRank +// +// Acceptable are also parts of name: +// amx_statscfg off say +// amx_statscfg on End #include #include @@ -1008,4 +1016,4 @@ getTop15_steam(id){ } pos += format(g_Buffer[pos],2047-pos,"") -} \ No newline at end of file +} diff --git a/plugins/dod/stats_logging.sma b/plugins/dod/stats_logging.sma index 589dd37a..c99fd489 100755 --- a/plugins/dod/stats_logging.sma +++ b/plugins/dod/stats_logging.sma @@ -1,9 +1,16 @@ -/* AMX Mod script. (Feb 4th, 2003) - * - * Stats Logging - * by JustinHoMi - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2003 JustinHoMi. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// DoD Stats Logging Plugin +// #include #include diff --git a/plugins/dod/statssounds.sma b/plugins/dod/statssounds.sma index 68127b3f..f9eb5adc 100755 --- a/plugins/dod/statssounds.sma +++ b/plugins/dod/statssounds.sma @@ -1,6 +1,15 @@ -/* -* Plugin for sounds precache -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// DoD Sounds Precache Plugin +// #include @@ -26,4 +35,4 @@ public plugin_precache(){ public plugin_init() { register_plugin("DoD Sounds Precache",AMXX_VERSION_STR,"AMXX Dev Team") -} \ No newline at end of file +} diff --git a/plugins/imessage.sma b/plugins/imessage.sma index 0ef2334e..9a0a37ff 100755 --- a/plugins/imessage.sma +++ b/plugins/imessage.sma @@ -1,36 +1,15 @@ -/* AMX Mod X -* Info. Messages Plugin -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Info. Messages Plugin +// #include #include diff --git a/plugins/include/amxconst.inc b/plugins/include/amxconst.inc index f82ffefd..15334628 100755 --- a/plugins/include/amxconst.inc +++ b/plugins/include/amxconst.inc @@ -1,10 +1,11 @@ -/* AMX Mod X constants -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is provided as is (no warranties). -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #if defined _amxconst_included #endinput diff --git a/plugins/include/amxmisc.inc b/plugins/include/amxmisc.inc index e57c9188..ccd7a511 100755 --- a/plugins/include/amxmisc.inc +++ b/plugins/include/amxmisc.inc @@ -1,10 +1,11 @@ -/* AMX Mod X misc. -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is provided as is (no warranties). -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #if defined _amxmisc_included #endinput diff --git a/plugins/include/amxmodx.inc b/plugins/include/amxmodx.inc index 5cb45829..b853c394 100755 --- a/plugins/include/amxmodx.inc +++ b/plugins/include/amxmodx.inc @@ -1,10 +1,11 @@ -/* AMX Mod X functions -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is provided as is (no warranties). -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #if defined _amxmodx_included #endinput @@ -26,6 +27,8 @@ #include #include #include +#include +#include /** * Called just after server activation. @@ -246,6 +249,20 @@ native precache_sound(const name[]); */ native precache_generic(const szFile[]); +/** + * Changes map. + * + * @note This calls the pfnChangelLevel engine function. + * @note This has the same behavior as calling the "changelevel" server command, + * but this will also trigger the server_changelevel() forward in AMXX plugins. + * It will also notify any Metamod plugins that are hooking pfnChangeLevel. + * + * @param map The map name to change. + * + * @noreturn + */ +native change_level(const map[]); + /** * Sets info on the client. * diff --git a/plugins/include/amxmodx_version.inc b/plugins/include/amxmodx_version.inc index 0873513c..faba7062 100644 --- a/plugins/include/amxmodx_version.inc +++ b/plugins/include/amxmodx_version.inc @@ -1,10 +1,11 @@ -/* AMX Mod X constants -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is provided as is (no warranties). -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #if defined _amxmodx_version_included #endinput diff --git a/plugins/include/cellarray.inc b/plugins/include/cellarray.inc index 226d87da..09d4444f 100644 --- a/plugins/include/cellarray.inc +++ b/plugins/include/cellarray.inc @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #if defined _cellarray_included #endinput #endif diff --git a/plugins/include/cellstack.inc b/plugins/include/cellstack.inc index ad5c083a..81043d76 100644 --- a/plugins/include/cellstack.inc +++ b/plugins/include/cellstack.inc @@ -1,3 +1,11 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #if defined _cellstack_included #endinput diff --git a/plugins/include/celltrie.inc b/plugins/include/celltrie.inc index 355fb913..9a05a4b2 100644 --- a/plugins/include/celltrie.inc +++ b/plugins/include/celltrie.inc @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #if defined _celltrie_included #endinput #endif diff --git a/plugins/include/csstats.inc b/plugins/include/csstats.inc index 7755dcf2..eb8dd300 100755 --- a/plugins/include/csstats.inc +++ b/plugins/include/csstats.inc @@ -1,3 +1,11 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #if defined _csstats_included #endinput diff --git a/plugins/include/cstrike.inc b/plugins/include/cstrike.inc index 294eb31e..6c404eda 100755 --- a/plugins/include/cstrike.inc +++ b/plugins/include/cstrike.inc @@ -1,9 +1,15 @@ -/* Counter-Strike functions -* -* by the AMX Mod X Development Team -* -* This file is provided as is (no warranties). -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Counter-Strike Functions +// #if defined _cstrike_included #endinput @@ -415,4 +421,4 @@ forward CS_OnBuyAttempt(index, item); * @param index Player index. * @param item Item index, see CSI_* constants. */ -forward CS_OnBuy(index, item); \ No newline at end of file +forward CS_OnBuy(index, item); diff --git a/plugins/include/csx.inc b/plugins/include/csx.inc index 365a39f4..3616d178 100755 --- a/plugins/include/csx.inc +++ b/plugins/include/csx.inc @@ -1,8 +1,15 @@ -/* CSX functions - * - * (c) 2004, SidLuke - * This file is provided as is (no warranties). - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// CSX Functions +// #if defined _csx_included #endinput diff --git a/plugins/include/datapack.inc b/plugins/include/datapack.inc index 3dd75547..80d12648 100644 --- a/plugins/include/datapack.inc +++ b/plugins/include/datapack.inc @@ -1,3 +1,11 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #if defined _datapack_included #endinput diff --git a/plugins/include/dbi.inc b/plugins/include/dbi.inc index 82c24d84..ba371483 100755 --- a/plugins/include/dbi.inc +++ b/plugins/include/dbi.inc @@ -1,16 +1,29 @@ -/* SQL Database API - * By the AMX Mod X Development Team - * Notes - Read the comments! Make sure your plugins use - * nice ANSI SQL and don't use database column names like "key" - * otherwise this API will be a nightmare - * Never do error checking with the not operator! This is bad: - * if (!dbi_query()) - * You should do: - * ret = dbi_query() - * if (ret < 0) - * This is because DBI functions can and will return negative numbers - * Negative numbers evaluate to "true" in AMX. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// SQL Database API +// + +// +// Notes - Read the comments! Make sure your plugins use +// nice ANSI SQL and don't use database column names like "key" +// otherwise this API will be a nightmare +// +// Never do error checking with the not operator! This is bad: +// if (!dbi_query()) +// You should do: +// ret = dbi_query() +// if (ret < 0) +// This is because DBI functions can and will return negative numbers +// Negative numbers evaluate to "true" in AMX. +// #if defined _dbi_included #endinput diff --git a/plugins/include/dodconst.inc b/plugins/include/dodconst.inc index 40711096..ca53e802 100755 --- a/plugins/include/dodconst.inc +++ b/plugins/include/dodconst.inc @@ -1,8 +1,11 @@ -/* DoDX functions - * - * (c) 2004, SidLuke - * This file is provided as is (no warranties). - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #if defined _dodconst_included #endinput diff --git a/plugins/include/dodfun.inc b/plugins/include/dodfun.inc index ea8f63da..5add00ed 100755 --- a/plugins/include/dodfun.inc +++ b/plugins/include/dodfun.inc @@ -1,8 +1,15 @@ -/* DoDFun functions - * - * (c) 2004-2005, SidLuke - * This file is provided as is (no warranties). - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// DoD Fun Functions +// #if defined _dodfun_included #endinput diff --git a/plugins/include/dodstats.inc b/plugins/include/dodstats.inc index cf3d072b..a250a2ba 100755 --- a/plugins/include/dodstats.inc +++ b/plugins/include/dodstats.inc @@ -1,8 +1,15 @@ -/* DoDX Stats functions - * - * (c) 2004, SidLuke - * This file is provided as is (no warranties). - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// DODX Stats Functions +// #if defined _dodstats_included #endinput diff --git a/plugins/include/dodx.inc b/plugins/include/dodx.inc index 99710b31..09396899 100755 --- a/plugins/include/dodx.inc +++ b/plugins/include/dodx.inc @@ -1,8 +1,15 @@ -/* DoDX functions - * - * (c) 2004, SidLuke - * This file is provided as is (no warranties). - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// DODX Functions +// #if defined _dodx_included #endinput diff --git a/plugins/include/engine.inc b/plugins/include/engine.inc index ae20be03..56551716 100755 --- a/plugins/include/engine.inc +++ b/plugins/include/engine.inc @@ -1,10 +1,16 @@ -/* Engine functions -* -* by the AMX Mod X Development Team -* thanks to Vexd and mahnsawce -* -* This file is provided as is (no warranties). -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Special thanks to Vexd and mahnsawce. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Engine Functions +// #if defined _engine_included #endinput diff --git a/plugins/include/engine_const.inc b/plugins/include/engine_const.inc index c4414a64..9a88dec6 100755 --- a/plugins/include/engine_const.inc +++ b/plugins/include/engine_const.inc @@ -1,9 +1,15 @@ -/* Engine constants -* -* by the AMX Mod X Development Team -* -* This file is provided as is (no warranties). -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Engine Constants +// #if defined _engine_const_included #endinput diff --git a/plugins/include/engine_stocks.inc b/plugins/include/engine_stocks.inc index 6d80700c..638905e8 100755 --- a/plugins/include/engine_stocks.inc +++ b/plugins/include/engine_stocks.inc @@ -1,10 +1,16 @@ -/* Engine stocks -* -* by the AMX Mod X Development Team -* thanks to AssKicR, Freecode and T(+)rget -* -* This file is provided as is (no warranties). -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Special thanks to AssKicR, Freecode, and T(+)rget. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Engine Stocks +// #if defined _engine_stocks_included #endinput diff --git a/plugins/include/esf_const.inc b/plugins/include/esf_const.inc index 91b8191d..0b2615b7 100755 --- a/plugins/include/esf_const.inc +++ b/plugins/include/esf_const.inc @@ -1,9 +1,12 @@ -/** - * (C)2004-2005 AMX Mod X Development Team - * based on the stocks and information provided by LynX - * organized and released by BAILOPAN - * This file is provided as is (no warranties). - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Based on stocks and information provided by LynX. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #if defined _esfconst_included #endinput diff --git a/plugins/include/fakemeta.inc b/plugins/include/fakemeta.inc index d2460b46..b401616c 100755 --- a/plugins/include/fakemeta.inc +++ b/plugins/include/fakemeta.inc @@ -1,9 +1,15 @@ -/* FakeMeta functions -* -* by the AMX Mod X Development Team -* -* This file is provided as is (no warranties). -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Fakemeta Functions +// #if defined _fakemeta_included #endinput diff --git a/plugins/include/fakemeta_const.inc b/plugins/include/fakemeta_const.inc index 851bcb80..1fc69162 100755 --- a/plugins/include/fakemeta_const.inc +++ b/plugins/include/fakemeta_const.inc @@ -1,9 +1,15 @@ -/* FakeMeta constants -* -* by the AMX Mod X Development Team -* -* This file is provided as is (no warranties). -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Fakemeta Constants +// #if defined _fakemeta_const_included #endinput diff --git a/plugins/include/fakemeta_stocks.inc b/plugins/include/fakemeta_stocks.inc index 7a7a6bb0..72ee36d5 100755 --- a/plugins/include/fakemeta_stocks.inc +++ b/plugins/include/fakemeta_stocks.inc @@ -1,9 +1,15 @@ -/* FakeMeta stocks -* -* by the AMX Mod X Development Team -* -* This file is provided as is (no warranties). -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Fakemeta Stocks +// #if !defined _fakemeta_included #include diff --git a/plugins/include/file.inc b/plugins/include/file.inc index b983e7bb..cd509a68 100755 --- a/plugins/include/file.inc +++ b/plugins/include/file.inc @@ -1,10 +1,15 @@ -/* Files functions -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is provided as is (no warranties). -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// File Functions +// #if defined _file_included #endinput diff --git a/plugins/include/fun.inc b/plugins/include/fun.inc index 3dd9f750..16d3a457 100755 --- a/plugins/include/fun.inc +++ b/plugins/include/fun.inc @@ -1,9 +1,15 @@ -/* Fun functions -* -* by the AMX Mod X Development Team -* -* This file is provided as is (no warranties). -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Fun Functions +// #if defined _fun_included #endinput diff --git a/plugins/include/geoip.inc b/plugins/include/geoip.inc index 8a253949..15f047e7 100755 --- a/plugins/include/geoip.inc +++ b/plugins/include/geoip.inc @@ -1,74 +1,255 @@ -/* GeoIP module functions for AMX Mod X - by David "BAILOPAN" Anderson - (C)Copyrighted under the GNU General Public License, Version 2 - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// GeoIP Module Functions +// #if defined geoip_included - #endinput + #endinput #endif #define _geoip_included #if AMXX_VERSION_NUM >= 175 - #pragma reqlib geoip - #if !defined AMXMODX_NOAUTOLOAD - #pragma loadlib geoip - #endif + #pragma reqlib geoip + #if !defined AMXMODX_NOAUTOLOAD + #pragma loadlib geoip + #endif #else - #pragma library geoip + #pragma library geoip #endif -/// IP addresses passed to these natives can contain ports, the ports will be ignored. +/** + * @global IP addresses passed to these natives can contain ports, the ports will be ignored. + */ /** - * Lookup the two character country code for a given IP address. + * Look up the two character country code for a given IP address. * e.g: "US", "CA", etc. * - * @param ip The IP address to lookup. - * @param result The result buffer. If the lookup does not succeed, the buffer is not modified. - * @return true on a successful lookup, false on a failed lookup. + * @param ip The IP address to lookup. + * @param result The result buffer. If the lookup does not succeed, the buffer is not modified. + * + * @return true on a successful lookup, false on a failed lookup. */ native bool:geoip_code2_ex(const ip[], result[3]); /** - * Lookup the three character country code for a given IP address. + * Look up the three character country code for a given IP address. * e.g: "USA", "cAN", etc. * - * @param ip The IP address to lookup. - * @param result The result buffer. If the lookup does not succeed, the buffer is not modified. - * @return true on a successful lookup, false on a failed lookup. + * @param ip The IP address to lookup. + * @param result The result buffer. If the lookup does not succeed, the buffer is not modified. + * + * @return true on a successful lookup, false on a failed lookup. */ native bool:geoip_code3_ex(const ip[], result[4]); /** - * @deprecated * Lookup the two character country code for a given IP address. * - * @note This native will overflow the buffer by one cell on an unknown ip lookup! - * @note Use geoip_code2_ex instead! + * @deprecated This native will overflow the buffer by one cell on an unknown ip lookup! + * Use geoip_code2_ex instead. * - * @param ip The IP address to lookup. - * @param result The result buffer. + * @param ip The IP address to lookup. + * @param result The result buffer. + * + * @return 1 on a successful lookup, 0 otherwise. */ +//#pragma deprecated Use geoip_code2_ex() instead. native geoip_code2(const ip[], ccode[3]); /** - * @deprecated * Lookup the three character country code for a given IP address. * - * @note This native will overflow the buffer by one cell on an unknown ip lookup! - * @note Use geoip_code3_ex instead! + * @deprecated This native will overflow the buffer by one cell on an unknown ip lookup! + * Use geoip_code3_ex instead. * - * @param ip The IP address to lookup. - * @param result The result buffer. + * @param ip The IP address to lookup. + * @param result The result buffer. + * + * @return 1 on a successful lookup, 0 otherwise. */ +//#pragma deprecated Use geoip_code3() instead. native geoip_code3(const ip[], result[4]); /** * Lookup the full country name for the given IP address. Sets the buffer to "error" on * an unsuccessful lookup. * - * @param ip The IP address to lookup. - * @param result The result of the geoip lookup. - * @param len The maximum length of the result buffer. + * @param ip The IP address to lookup. + * @param result The result of the geoip lookup. + * @param len The maximum length of the result buffer. + * @param id An optional player's index in order to return the result + * in the player's language, if supported. + * -1: the default language, which is english. + * 0: the server language. You can use LANG_SERVER define. + * >=1: the player's language. + * + * @return The result length on successful lookup, 0 otherwise. */ -native geoip_country(const ip[], result[], len=45); +native geoip_country(const ip[], result[], len, id = -1); + + +/** + * Look up the full city name for the given IP address. + * + * @note This native requires GeoIP City database, which can be retrieved from: + * http://dev.maxmind.com/geoip/geoip2/geolite2/ (MaxMind DB binary) + * + * @param ip The IP address to look up. + * @param result The result of the geoip look up. + * @param len The maximum length of the result buffer. + * @param id An optional player's index in order to return the result + * in the player's language, if supported. + * -1: the default language, which is english. + * 0: the server language. You can use LANG_SERVER define. + * >=1: the player's language. + * + * @return The result length on successful lookup, 0 otherwise. + */ +native geoip_city(const ip[], result[], len, id = -1); + +/** + * Look up the region/state code for the given IP address. + * e.g. "US-OH", "DE-HH", IT-82, "FR-U", etc. + * + * @note This native requires GeoIP City database, which can be retrieved from: + * http://dev.maxmind.com/geoip/geoip2/geolite2/ (MaxMind DB binary) + * + * @param ip The IP address to look up. + * @param result The result of the geoip look up. + * @param len The maximum length of the result buffer. + * + * @return The result length on successful lookup, 0 otherwise. + */ +native geoip_region_code(const ip[], result[], len); + +/** + * Look up the full region/state name for the given IP address. + * + * @note This native requires GeoIP City database, which can be retrieved from: + * http://dev.maxmind.com/geoip/geoip2/geolite2/ (MaxMind DB binary) + * + * @param ip The IP address to look up. + * @param result The result of the geoip look up. + * @param len The maximum length of the result buffer. + * @param id An optional player's index in order to return the result + * in the player's language, if supported. + * -1: the default language, which is english. + * 0: the server language. You can use LANG_SERVER define. + * >=1: the player's language. + * + * @return The result length on successful lookup, 0 otherwise. + */ +native geoip_region_name(const ip[], result[], len, id = -1); + +/** + * Look up the full time zone for the given IP address. + * e.g. America/Los_Angeles, Europe/Paris. + * + * @note This native requires GeoIP City database, which can be retrieved from: + * http://dev.maxmind.com/geoip/geoip2/geolite2/ (MaxMind DB binary) + * + * @param ip The IP address to look up. + * @param result The result of the geoip look up. + * @param len The maximum length of the result buffer. + * + * @return The result length on successful lookup, 0 otherwise. + */ +native geoip_timezone(const ip[], result[], len); + +/** + * Look up the city's latitude for the given IP address. + * + * @note This native requires GeoIP City database, which can be retrieved from: + * http://dev.maxmind.com/geoip/geoip2/geolite2/ (MaxMind DB binary) + * + * @param ip The IP address to look up. + * + * @return The result of the geoip look up, 0 if latitude is not found. + */ +native Float:geoip_latitude(const ip[]); + +/** + * Look up the city's longitude for the given IP address. + * + * @note This native requires GeoIP City database, which can be retrieved from: + * http://dev.maxmind.com/geoip/geoip2/geolite2/ (MaxMind DB binary) + * + * @param ip The IP address to look up. + * + * @return The result of the geoip look up, 0 if longitude is not found. + */ +native Float:geoip_longitude(const ip[]); + +/** + * Calculate the distance between geographical coordinates, latitude and longitude. + * + * @note This native requires GeoIP City database, which can be retrieved from: + * http://dev.maxmind.com/geoip/geoip2/geolite2/ (MaxMind DB binary) + * + * @param lat1 The first IP latitude. + * @param lon1 The first IP longitude. + * @param lat2 The second IP latitude. + * @param lon2 The second IP longitude. + * @param system The system of measurement, 0 = Metric(kilometers) or 1 = English(miles). + * + * @return The distance as result in specified system of measurement. + */ +#define SYSTEM_METRIC 0 // kilometers +#define SYSTEM_IMPERIAL 1 // statute miles + +native Float:geoip_distance(Float:lat1, Float:lon1, Float:lat2, Float:lon2, system = SYSTEM_METRIC); + +/** + * Look up the continent code for a given IP address. + * + * @note This native requires GeoIP City database, which can be retrieved from: + * http://dev.maxmind.com/geoip/geoip2/geolite2/ (MaxMind DB binary) + * @note The code can be retrieved as integer (See CONTINENT_* constants.) or string (2 characters). + * @note Possible continent codes are AF, AN, AS, EU, NA, OC, SA for + * Africa(1), Antarctica(2), Asia(3), Europe(4), North America(5), Oceania(6), South America(7). + * + * @param ip The IP address to look up. + * @param result The result of the geoip look up. + * + * @return The continent id on successful lookup, 0 otherwise. + */ +enum Continent +{ + CONTINENT_UNKNOWN = 0, + CONTINENT_AFRICA, + CONTINENT_ANTARCTICA, + CONTINENT_ASIA, + CONTINENT_EUROPE, + CONTINENT_NORTH_AMERICA, + CONTINENT_OCEANIA, + CONTINENT_SOUTH_AMERICA, +}; +native Continent:geoip_continent_code(const ip[], result[3]); + +/** + * Look up the full continent name for the given IP address. + * + * @note This native requires GeoIP City database, which can be retrieved from: + * http://dev.maxmind.com/geoip/geoip2/geolite2/ (MaxMind DB binary) + * + * @param ip The IP address to look up. + * @param result The result of the geoip look up. + * @param len The maximum length of the result buffer. + * @param id An optional player's index in order to return the result + * in the player's language, if supported. + * -1: the default language, which is english. + * 0: the server language. You can use LANG_SERVER define. + * >=1: the player's language. + * + * @return The result length on successful lookup, 0 otherwise. + */ +native geoip_continent_name(const ip[], result[], len, id = -1); diff --git a/plugins/include/ham_const.inc b/plugins/include/ham_const.inc index 619206bf..8c6a31e1 100644 --- a/plugins/include/ham_const.inc +++ b/plugins/include/ham_const.inc @@ -1,3 +1,16 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Ham Sandwich Constants +// + #if defined _ham_const_included #endinput #endif diff --git a/plugins/include/hamsandwich.inc b/plugins/include/hamsandwich.inc index 97ff1567..9718cc36 100644 --- a/plugins/include/hamsandwich.inc +++ b/plugins/include/hamsandwich.inc @@ -1,31 +1,15 @@ -/* Ham Sandwich - * Copyright 2007-2014 - * By the AMX Mod X Development Team - * - * Ham Sandwich is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * Ham Sandwich is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Ham Sandwich; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of Ham Sandwich with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Ham Sandwich Functions +// /** * Ham Sandwich is a module that is used to hook and call virtual functions of diff --git a/plugins/include/hlsdk_const.inc b/plugins/include/hlsdk_const.inc index df9591a9..796df514 100644 --- a/plugins/include/hlsdk_const.inc +++ b/plugins/include/hlsdk_const.inc @@ -1,10 +1,15 @@ -/* Half-Life Software Development Kit constants -* -* by the AMX Mod X Development Team -* -* This file is provided as is (no warranties). -* -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Half-Life SDK Constants +// #if defined _hlsdk_const_included #endinput diff --git a/plugins/include/lang.inc b/plugins/include/lang.inc index ba086352..e037ae3b 100755 --- a/plugins/include/lang.inc +++ b/plugins/include/lang.inc @@ -1,9 +1,15 @@ -/* Language functions -* -* by the AMX Mod X Development Team -* -* This file is provided as is (no warranties). -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Language Functions +// #if defined _lang_included #endinput diff --git a/plugins/include/message_const.inc b/plugins/include/message_const.inc index 0b2b1dc8..c0574cfb 100644 --- a/plugins/include/message_const.inc +++ b/plugins/include/message_const.inc @@ -1,10 +1,15 @@ -/* Message constants -* -* by the AMX Mod X Development Team -* -* This file is provided as is (no warranties). -* -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Message Constants +// #if defined _message_const_included #endinput diff --git a/plugins/include/message_stocks.inc b/plugins/include/message_stocks.inc index 6c39e33f..1817ed98 100644 --- a/plugins/include/message_stocks.inc +++ b/plugins/include/message_stocks.inc @@ -1,10 +1,15 @@ -/* Message Stocks -* -* by the AMX Mod X Development Team -* -* This file is provided as is (no warranties). -* -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Message Stocks +// #if defined _message_stocks_included #endinput diff --git a/plugins/include/messages.inc b/plugins/include/messages.inc index df49b8f2..97ed18d0 100644 --- a/plugins/include/messages.inc +++ b/plugins/include/messages.inc @@ -1,9 +1,15 @@ -/* Messaging functions (now part of Core) - * - * by the AMX Mod X Development Team - * - * This file is provided as is (no warranties). - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Message Functions +// #if defined _coremsg_included #endinput diff --git a/plugins/include/newmenus.inc b/plugins/include/newmenus.inc index b9345b41..9ebf7652 100644 --- a/plugins/include/newmenus.inc +++ b/plugins/include/newmenus.inc @@ -1,10 +1,11 @@ -/* AMX Mod X constants -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is provided as is (no warranties). -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license #if defined _newmenus_included #endinput diff --git a/plugins/include/ns.inc b/plugins/include/ns.inc index fbcfa025..7ed0e13a 100755 --- a/plugins/include/ns.inc +++ b/plugins/include/ns.inc @@ -1,9 +1,15 @@ -/* NS module functions - * - * by the AMX Mod X Development Team - * - * This file is provided as is (no warranties). - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection Module Functions +// #if defined NS_INC #endinput diff --git a/plugins/include/ns_const.inc b/plugins/include/ns_const.inc index d0182501..b1eb9458 100755 --- a/plugins/include/ns_const.inc +++ b/plugins/include/ns_const.inc @@ -1,11 +1,15 @@ -/* NS module constants - * - * by the AMX Mod X Development Team - * Most definitions graciously provided by Flayra - * - * This file is provided as is (no warranties). - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license +// +// Natural Selection Module Constants +// #if defined NS_CONST_INC #endinput diff --git a/plugins/include/nvault.inc b/plugins/include/nvault.inc index 33736f7e..60db914a 100755 --- a/plugins/include/nvault.inc +++ b/plugins/include/nvault.inc @@ -1,9 +1,15 @@ -/* nVault functions -* -* by the AMX Mod X Development Team -* -* This file is provided as is (no warranties). -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// NVault Functions +// #if defined _nvault_included #endinput diff --git a/plugins/include/regex.inc b/plugins/include/regex.inc index 76ad5bb8..596e9111 100755 --- a/plugins/include/regex.inc +++ b/plugins/include/regex.inc @@ -1,31 +1,15 @@ -/** - * Regular Expressions API - * By the AMX Mod X Development Team - * - * 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 the - * Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * this program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * In addition, as a special exception, the author gives permission to - * link the code of this program with the Half-Life Game Engine ("HL - * Engine") and Modified Game Libraries ("MODs") developed by Valve, - * L.L.C ("Valve"). You must obey the GNU General Public License in all - * respects for all of the code used other than the HL Engine and MODs - * from Valve. If you modify this file, you may extend this exception - * to your version of the file, but you are not obligated to do so. If - * you do not wish to do so, delete this exception statement from your - * version. - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Regular Expressions API +// #if defined _regex_included #endinput @@ -369,4 +353,4 @@ stock regex_match_simple(const str[], const pattern[], flags = 0, error[]= "", m * 0 = No match. * >1 = Number of matches. */ -native regex_replace(Regex:pattern, string[], maxLen, const replace[], flags = REGEX_FORMAT_DEFAULT, &errcode = 0); \ No newline at end of file +native regex_replace(Regex:pattern, string[], maxLen, const replace[], flags = REGEX_FORMAT_DEFAULT, &errcode = 0); diff --git a/plugins/include/sockets.inc b/plugins/include/sockets.inc index aba6df8d..4b14c116 100755 --- a/plugins/include/sockets.inc +++ b/plugins/include/sockets.inc @@ -1,12 +1,18 @@ -/* - * - * AMX Mod X Module - * Basic Socket Functions - * - * Codebase from Ivan, -g-s-ivan@web.de (AMX 0.9.3) - * Modification by Olaf Reusch, kenterfie@hlsw.de (AMXX 0.16, AMX 0.96) - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// Codebase from Ivan, -g-s-ivan@web.de (AMX 0.9.3) +// Modification by Olaf Reusch, kenterfie@hlsw.de (AMXX 0.16, AMX 0.96) +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Socket Functions +// #if defined _socket_included #endinput diff --git a/plugins/include/sorting.inc b/plugins/include/sorting.inc index e111a7b2..b2b86d41 100644 --- a/plugins/include/sorting.inc +++ b/plugins/include/sorting.inc @@ -1,13 +1,21 @@ -/* Sorting functions. - * - * by the AMX Mod X Development Team - * - * This file is provided as is (no warranties). - * - * All sort functions are based off the qsort() function from the - * C standard library, which uses the Quick Sort algorithm. - * For more info, see: http://linux.wku.edu/~lamonml/algor/sort/sort.html - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Sorting Functions +// + +// +// All sort functions are based off the qsort() function from the +// C standard library, which uses the Quick Sort algorithm. +// For more info, see: http://linux.wku.edu/~lamonml/algor/sort/sort.html +// #if defined _sorting_included #endinput diff --git a/plugins/include/sqlx.inc b/plugins/include/sqlx.inc index a95827e2..5641f9f4 100644 --- a/plugins/include/sqlx.inc +++ b/plugins/include/sqlx.inc @@ -1,6 +1,15 @@ -/** - * SQLX - Newer version of SQL stuff - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// SQLX - Newer SQL Database API +// #if defined _sqlx_included #endinput diff --git a/plugins/include/string.inc b/plugins/include/string.inc index 96adf466..adb39dfe 100755 --- a/plugins/include/string.inc +++ b/plugins/include/string.inc @@ -1,10 +1,15 @@ -/* Strings manipulation -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is provided as is (no warranties). -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// String Manipulation +// #if defined _string_included #endinput diff --git a/plugins/include/textparse_ini.inc b/plugins/include/textparse_ini.inc new file mode 100644 index 00000000..eb96b532 --- /dev/null +++ b/plugins/include/textparse_ini.inc @@ -0,0 +1,206 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// INI Parser Functions +// + +#if defined _textparse_ini_included + #endinput +#endif +#define _textparse_ini_included + +/** + * This parser API is entirely event based. + * You must hook events to receive data. + */ + +/** + * The INI file format is defined as: + * WHITESPACE: 0x20, \n, \t, \r + * IDENTIFIER: A-Z a-z 0-9 _ - , + . $ ? / + * STRING : Any set of symbols + * + * Basic syntax is comprised of SECTIONs. + * A SECTION is defined as: + * [SECTIONNAME] + * OPTION + * OPTION + * OPTION... + * + * SECTIONNAME is an IDENTIFIER. + * OPTION can be repeated any number of times, once per line. + * OPTION is defined as one of: + * KEY = "VALUE" + * KEY = VALUE + * KEY + * Where KEY is an IDENTIFIER and VALUE is a STRING. + * + * WHITESPACE should always be omitted. + * COMMENTS should be stripped, and are defined as text occurring in: + * ; + * + * Example file below. Note that the second line is technically invalid. + * The event handler must decide whether this should be allowed. + * --FILE BELOW-- + * [gaben] + * hi = clams + * bye = "NO CLAMS" + * + * [valve] + * cannot + * maintain + * products + */ + +/** + * Parser invalid code. + */ +enum INIParser +{ + Invalid_INIParser = 0 +}; + +/** + * Creates a new INI parser. + * This is used to set parse hooks. + * + * @return A new handle to an INI Parse structure. + */ +native INIParser:INI_CreateParser(); + +/** + * Disposes of an INI parser. + * + * @param handle Handle to an INI Parse structure. + * + * @return True if disposed, false otherwise. + */ +native INI_DestroyParser(&INIParser:handle); + +/** + * Parses an INI config file. + * + * @param handle A handle to an INI Parse structure. + * @param file A string containing the file path. + * @param line An optional by reference cell to store the last line number read. + * @param col An optional by reference cell to store the last column number read. + + * @return An SMCParseError result. + * @error Invalid or corrupt handle. + */ +native bool:INI_ParseFile(INIParser:handle, const file[], &line = 0, &col = 0); + +/** + * Sets the INI_ParseStart function of a parse handle. + * + * @note Below is the prototype of callback: + * - + * Called when parsing is started. + * + * @param handle A handle to an INI Parse structure. + * + * @noreturn + * + * public OnParseStart(INIParser:handle) + * - + * @param handle Handle to an INI Parse structure. + * @param func A ParseStart callback. + * + * @noreturn + * @error Invalid or corrupt handle. + */ +native INI_SetParseStart(INIParser:handle, const func[]); + +/** + * Sets the INI_ParseEnd function of a parse handle. + * + * @note Below is the prototype of callback: + * - + * Called when parsing is halted. + * + * @param handle A handle to an INI Parse structure. + * @param halted True if abnormally halted, false otherwise. + * + * @noreturn + * + * public OnParseEnd(INIParser:handle, bool:halted) + * - + * @param handle Handle to an INI Parse structure. + * @param func A ParseEnd callback. + * + * @noreturn + * @error Invalid or corrupt handle. + */ +native INI_SetParseEnd(INIParser:handle, const func[]); + +/** + * Sets the two main reader functions. + * + * @note Below is the prototype of callback: + * - + * NewSection: + * Called when the parser finds a new section. + * + * @param handle Handle to an INI Parse structure. + * @param section Name of section in between the [ and ] characters. + * @param invalid_tokens True if invalid tokens were detected in the name. + * @param close_bracket True if a closing bracket was detected, false otherwise. + * @param extra_tokens True if extra tokens were detected on the line. + * @param curtok Contains current token in the line where the section name starts. + * You can add to this offset when failing to point to a token. + * @return True to keep parsing, false otherwise. + * + * public bool:OnNewSection(INIParser:handle, const section[], bool:invalid_tokens, bool:close_bracket, bool:extra_tokens, curtok) + * + * KeyValue: + * Called when the parser finds a new key/value pair. + * + * @param handle Handle to an INI Parse structure. + * @param key Name of key. + * @param value String containing value (with quotes stripped, if any). + * @param invalid_tokens Whether or not the key contained invalid tokens. + * @param equal_token There was an '=' sign present (in case the value is missing). + * @param quotes Whether value was enclosed in quotes. + * @param curtok Contains the token index of the start of the value string. + * This can be changed when returning false. + * @return True to keep parsing, false otherwise. + * + * public bool:OnKeyValue(INIParser:handle, const key[], const value[], bool:invalid_tokens, bool:equal_token, bool:quotes, curtok) + * - + * @param handle Handle to an INI Parse structure. + * @param kv A KeyValue callback. + * @param ns An optional NewSection callback. + * + * @noreturn + */ +native INI_SetReaders(INIParser:smc, const kvFunc[], const nsFunc[] = "" ); + +/** + * Sets a raw line reader on an INI parser handle. + * + * @note Below is the prototype of callback: + * - + * Called whenever a raw line is read. + * + * @param handle The INI Parse handle. + * @param line Contents of line. + * @param lineno The line number it occurs on. + * @param curtok Pointer to optionally store failed position in string. + * + * @return True to keep parsing, false otherwise. + * + * public bool:OnRawLine(INIParser:smc, const line[], lineno, curtok) + * + * @param handle Handle to an INI Parse structure. + * @param func A RawLine callback. + * + * @noreturn + */ +native INI_SetRawLine(INIParser:handle, const func[]); diff --git a/plugins/include/textparse_smc.inc b/plugins/include/textparse_smc.inc new file mode 100644 index 00000000..5e54af18 --- /dev/null +++ b/plugins/include/textparse_smc.inc @@ -0,0 +1,254 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// SMC Parser Functions +// + +#if defined _textparse_smc_included + #endinput +#endif +#define _textparse_smc_included + +/** + * Everything below describes the SMC Parse, or "SourceMod Configuration" format. + * This parser is entirely event based. You must hook events to receive data. + * The file format itself is nearly identical to Valve's KeyValues format (also known as VDF). + */ + +/** + * The SMC file format is defined as: + * WHITESPACE: 0x20, \n, \t, \r + * IDENTIFIER: Any ASCII character EXCLUDING ", {, }, ;, //, / *, or WHITESPACE. + * STRING : Any set of symbols enclosed in quotes. + * + * Note: if a STRING does not have quotes, it is parsed as an IDENTIFIER. + * + * Basic syntax is comprised of SECTIONBLOCKs. + * A SECTIONBLOCK defined as: + * + * SECTIONNAME + * { + * OPTION + * } + * + * OPTION can be repeated any number of times inside a SECTIONBLOCK. + * A new line will terminate an OPTION, but there can be more than one OPTION per line. + * OPTION is defined any of: + * "KEY" "VALUE" + * SECTIONBLOCK + * + * SECTIONNAME, KEY, VALUE, and SINGLEKEY are strings + * SECTIONNAME cannot have trailing characters if quoted, but the quotes can be optionally removed. + * If SECTIONNAME is not enclosed in quotes, the entire sectionname string is used (minus surrounding whitespace). + * If KEY is not enclosed in quotes, the key is terminated at first whitespace. + * If VALUE is not properly enclosed in quotes, the entire value string is used (minus surrounding whitespace). + * The VALUE may have inner quotes, but the key string may not. + * + * For an example, see scripting/testsuite/textparse_test.cfg + * + * WHITESPACE should be ignored. + * Comments are text occurring inside the following tokens, and should be stripped + * unless they are inside literal strings: + * ; + * // + * / * * / + */ + +/** + * Parser invalid code. + */ +enum SMCParser +{ + Invalid_SMCParser = 0 +}; + +/** + * Parse result directive. + */ +enum SMCResult +{ + SMCParse_Continue, /* Continue parsing */ + SMCParse_Halt, /* Stop parsing here */ + SMCParse_HaltFail /* Stop parsing and return failure */ +}; + +/** + * Parse error codes. + */ +enum SMCError +{ + SMCError_Okay = 0, /* No error */ + SMCError_StreamOpen, /* Stream failed to open */ + SMCError_StreamError, /* The stream died... somehow */ + SMCError_Custom, /* A custom handler threw an error */ + SMCError_InvalidSection1, /* A section was declared without quotes, and had extra tokens */ + SMCError_InvalidSection2, /* A section was declared without any header */ + SMCError_InvalidSection3, /* A section ending was declared with too many unknown tokens */ + SMCError_InvalidSection4, /* A section ending has no matching beginning */ + SMCError_InvalidSection5, /* A section beginning has no matching ending */ + SMCError_InvalidTokens, /* There were too many unidentifiable strings on one line */ + SMCError_TokenOverflow, /* The token buffer overflowed */ + SMCError_InvalidProperty1, /* A property was declared outside of any section */ +}; + +/** + * Creates a new SMC parser. + * This is used to set parse hooks. + * + * @return A new handle to an SMC Parse structure. + */ +native SMCParser:SMC_CreateParser(); + +/** + * Disposes of an SMC parser. + * + * @param handle Handle to an SMC Parse structure. + * + * @return True if disposed, false otherwise. + */ +native SMC_DestroyParser(&SMCParser:handle); + +/** + * Parses a config file. + * + * @param handle A handle to an SMC Parse structure. + * @param file A string containing the file path. + * @param line An optional by reference cell to store the last line number read. + * @param col An optional by reference cell to store the last column number read. + * + * @return An SMCParseError result. + * @error Invalid or corrupt handle. + */ +native SMCError:SMC_ParseFile(SMCParser:handle, const file[], &line = 0, &col = 0); + +/** + * Sets the SMC_ParseStart function of a parse handle. + * + * @note Below is the prototype of callback: + * - + * Called when parsing is started. + * + * @param handle Handle to an SMC Parse structure. + * + * @noreturn + * + * public OnParseStart(SMCParser:handle) + * - + * @param handle Handle to an SMC Parse structure. + * @param func A ParseStart callback. + * + * @noreturn + * @error Invalid or corrupt handle. + */ +native SMC_SetParseStart(SMCParser:handle, const func[]); + +/** + * Sets the SMC_ParseEnd function of a parse handle. + * + * @note Below is the prototype of callback: + * - + * Called when parsing is halted. + * + * @param handle Handle to an SMC Parse structure. + * @param halted True if abnormally halted, false otherwise. + * @param failed True if parsing failed, false otherwise. + * + * @noreturn + * + * public OnParseEnd(SMCParser:handle, bool:halted, bool:failed) + * - + * @param handle Handle to an SMC Parse structure. + * @param func A ParseEnd callback. + * + * @noreturn + * @error Invalid or corrupt handle. + */ +native SMC_SetParseEnd(SMCParser:handle, const func[]); + +/** + * Sets the three main reader functions. + * + * @note Enclosing quotes are always stripped. + * @note Below is the prototype of callbacks: + * - + * NewSection: + * Called when the parser finds a new section or sub-section. + * + * @param handle Handle to an SMC Parse structure. + * @param name String containing section name. + * + * @return An SMCResult action to take. + * + * public SMCResult:OnNewSection(SMCParser:handle, const name[]) + * + * KeyValue: + * Called when the parser finds a new key/value pair. + * + * @param handle Handle to an SMC Parse structure. + * @param key String containing key name. + * @param value String containing value name. + * + * @return An SMCResult action to take. + * + * public SMCResult:OnKeyValue(SMCParser:handle, const key[], const value[]) + * + * EndSection: + * Called when the parser finds the end of the current section. + * + * @param handle Handle to an SMC Parse structure. + * + * @return An SMCResult action to take. + * + * public SMCResult:OnEndSection(SMCParser:handle) + * - + * @param handle Handle to an SMC Parse structure. + * @param kv A KeyValue callback. + * @param ns An optional NewSection callback. + * @param es An optional EndSection callback. + * + * @noreturn + */ +native SMC_SetReaders(SMCParser:smc, const kvFunc[], const nsFunc[] = "", const esFunc[] = ""); + +/** + * Sets a raw line reader on an text parser handle. + * + * @note Below is the prototype of callbacks: + * - + * Called whenever a raw line is read. + * + * @param handle Handle to an SMC Parse structure. + * @param line A string containing the raw line from the file. + * @param lineno The line number it occurs on. + * + * @return An SMCResult action to take. + * + * public SMCResult:SMC_RawLine(SMCParser:handle, const line[], lineno) + * - + * @param handle Handle to an SMC Parse structure. + * @param func A RawLine callback. + * + * @noreturn + */ +native SMC_SetRawLine(SMCParser:handle, const func[]); + +/** + * Gets an error string for an SMCError code. + * + * @note SMCError_Okay returns false. + * @note SMCError_Custom (which is thrown on SMCParse_HaltFail) returns false. + * + * @param error The SMCParseError code. + * @param buffer A string buffer for the error (contents undefined on failure). + * @param buf_max The maximum size of the buffer. + * + * @return True on success, false otherwise. + */ +native bool:SMC_GetErrorString(SMCError:error, buffer[], buf_max); diff --git a/plugins/include/tfcconst.inc b/plugins/include/tfcconst.inc index c9ca3f31..7c41a056 100755 --- a/plugins/include/tfcconst.inc +++ b/plugins/include/tfcconst.inc @@ -1,8 +1,15 @@ -/* TFCX const - * - * (c) 2004, SidLuke - * This file is provided as is (no warranties). - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TFCX Constants +// #if defined _tfcconst_included #endinput diff --git a/plugins/include/tfcstats.inc b/plugins/include/tfcstats.inc index eb118689..9417a0f6 100755 --- a/plugins/include/tfcstats.inc +++ b/plugins/include/tfcstats.inc @@ -1,8 +1,15 @@ -/* TFCX Stats functions - * - * (c) 2004, SidLuke - * This file is provided as is (no warranties). - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TFCX Stats Functions +// #if defined _tfcstats_included #endinput diff --git a/plugins/include/tfcx.inc b/plugins/include/tfcx.inc index 73bff77c..0ca17895 100755 --- a/plugins/include/tfcx.inc +++ b/plugins/include/tfcx.inc @@ -1,8 +1,15 @@ -/* tfcX functions - * - * (c) 2004, SidLuke - * This file is provided as is (no warranties). - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TFCX Functions +// #if defined _tfcx_included #endinput diff --git a/plugins/include/time.inc b/plugins/include/time.inc index b76a275d..a70cf9d8 100644 --- a/plugins/include/time.inc +++ b/plugins/include/time.inc @@ -1,9 +1,15 @@ -/* Time specific functions -* -* by the AMX Mod X Development Team -* -* This file is provided as is (no warranties). -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Time Specific Functions +// #if defined _time_included #endinput diff --git a/plugins/include/tsconst.inc b/plugins/include/tsconst.inc index a49ec5f1..b41a2c55 100755 --- a/plugins/include/tsconst.inc +++ b/plugins/include/tsconst.inc @@ -1,8 +1,16 @@ -/* TSFUN constants - * - * (c) 2005, Suzuka - * This file is provided as is (no warranties). - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2005 Suzuka. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TSFUN Constants +// #if defined _tsconst_included #endinput diff --git a/plugins/include/tsfun.inc b/plugins/include/tsfun.inc index 623df22a..d0192412 100755 --- a/plugins/include/tsfun.inc +++ b/plugins/include/tsfun.inc @@ -1,8 +1,15 @@ -/* TSFUN - * - * (c) 2005-2006, AMX Mod X Dev Team - * This file is provided as is (no warranties). - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TSFUN Functions +// #if defined _tsxfun_included #endinput diff --git a/plugins/include/tsstats.inc b/plugins/include/tsstats.inc index 7ec543f9..4b43a784 100755 --- a/plugins/include/tsstats.inc +++ b/plugins/include/tsstats.inc @@ -1,8 +1,15 @@ -/* TSXMod Stats functions - * - * (c) 2004, SidLuke - * This file is provided as is (no warranties). - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TSX Stats Functions +// #if defined _tsstats_included #endinput diff --git a/plugins/include/tsx.inc b/plugins/include/tsx.inc index 222b227a..4e1b3c12 100755 --- a/plugins/include/tsx.inc +++ b/plugins/include/tsx.inc @@ -1,8 +1,15 @@ -/* TSXMod functions - * - * (c) 2004, SidLuke - * This file is provided as is (no warranties). - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TSX Functions +// #if defined _tsx_included #endinput diff --git a/plugins/include/vault.inc b/plugins/include/vault.inc index 43a915cd..b38ac4c6 100755 --- a/plugins/include/vault.inc +++ b/plugins/include/vault.inc @@ -1,10 +1,15 @@ -/* Vault functions -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is provided as is (no warranties). -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Vault Functions +// #if defined _vault_included #endinput diff --git a/plugins/include/vector.inc b/plugins/include/vector.inc index 39ba89b8..e30b52dd 100644 --- a/plugins/include/vector.inc +++ b/plugins/include/vector.inc @@ -1,9 +1,15 @@ -/* Vector functions (now part of Core) - * - * by the AMX Mod X Development Team - * - * This file is provided as is (no warranties). - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Vector Functions +// #if defined _corevector_included #endinput diff --git a/plugins/include/xs.inc b/plugins/include/xs.inc index e7f3c6fb..a515e80d 100755 --- a/plugins/include/xs.inc +++ b/plugins/include/xs.inc @@ -1,70 +1,52 @@ -/* XS Library -* for AMX and AMXX -* -* Copyright (C) 2004 Pavol "PM" Marko -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -* -* Version 0.1 -* -* -* MACROS THAT YOU CAN DEFINE BEFORE INCLUDING XS.INC: -* XS_FLEQ_TOLERANCE: -* Tolerance that is used for XS_FLEQ float nearly-equal comparisions -* DEFAULT: 0.000005 -* XS_DEBUG -* Turn debug logging on -* DEFAULT: 0 -* XS_LOGBUFFER_SIZE -* Buffer size for logging -* DEFAULT: 512 -* XS_TASK_MAXPARAMS -* Maximal parameter count for managed tasks -* DEFAULT: 8 -* XS_TASK_MAXPARAMSIZE -* Maximal size of string parameter for tasks -* Has to be power of 2 and has to be >= 8 -* DEFAULT: 512 -* XS_TASK_MANAGEDIDS -* Number of managed IDs for tasks. -* DEFAULT: 2048 -* XS_REPLACEBUF_SIZE -* DEFAULT: 3072 -* -* -* NOTES: -* On AMX, VexdUM is required for some math functions -* -* xs__ / XS__ (2 underscores) stuff is meant to be intern -* -* untested: never tested -* half-tested: succesfully used in other applications; not extensively tested in xs though -* tested: fully tested -* -* If you have any useful functions / ideas for functions, please tell me. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 Pavol "PM" Marko +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// XS Library +// Version 0.1 +// +// MACROS THAT YOU CAN DEFINE BEFORE INCLUDING XS.INC: +// XS_FLEQ_TOLERANCE: +// Tolerance that is used for XS_FLEQ float nearly-equal comparisions +// DEFAULT: 0.000005 +// XS_DEBUG +// Turn debug logging on +// DEFAULT: 0 +// XS_LOGBUFFER_SIZE +// Buffer size for logging +// DEFAULT: 512 +// XS_TASK_MAXPARAMS +// Maximal parameter count for managed tasks +// DEFAULT: 8 +// XS_TASK_MAXPARAMSIZE +// Maximal size of string parameter for tasks +// Has to be power of 2 and has to be >= 8 +// DEFAULT: 512 +// XS_TASK_MANAGEDIDS +// Number of managed IDs for tasks. +// DEFAULT: 2048 +// XS_REPLACEBUF_SIZE +// DEFAULT: 3072 +// +// +// NOTES: +// On AMX, VexdUM is required for some math functions +// +// xs__ / XS__ (2 underscores) stuff is meant to be intern +// +// untested: never tested +// half-tested: succesfully used in other applications; not extensively tested in xs though +// tested: fully tested +// +// If you have any useful functions / ideas for functions, please tell me. +// #if defined _xs_included #endinput @@ -101,1043 +83,1028 @@ #define XS_REPLACEBUF_SIZE 3072 #endif -// Turn on for release -#define XS__LIBRELEASE 1 - -#if XS__LIBRELEASE - #define XS_LIBFUNC_ATTRIB stock -#else - #define XS_LIBFUNC_ATTRIB -#endif -#if XS__LIBRELEASE - #define XS_LIBVAR_ATTRIB stock -#else - #define XS_LIBVAR_ATTRIB new -#endif - /****** DEBUGGING / LOGING FUNCTIONS ******/ - enum xs_logtypes - { - xs_debug, - xs_message, - xs_warning, - xs_error, - xs_fatalerror, - xs__assertionfailed, - - // must come last - xs_logtypes_count - } +enum xs_logtypes +{ + xs_debug, + xs_message, + xs_warning, + xs_error, + xs_fatalerror, + xs__assertionfailed, - XS_LIBVAR_ATTRIB const xs__logtypenames[xs_logtypes_count][] = {"DEBUG", "", "WARNING", "ERROR", "FATAL ERROR", "DEBUG ASSERTION FAILED"}; + // must come last + xs_logtypes_count +} + +stock const xs__logtypenames[xs_logtypes_count][] = {"DEBUG", "", "WARNING", "ERROR", "FATAL ERROR", "DEBUG ASSERTION FAILED"}; + +// tested +stock xs_log(xs_logtypes:logtype, {Float,_}:...) +{ + // WARNING: Don't try to use assert in here; it uses this func - // tested - XS_LIBFUNC_ATTRIB xs_log(xs_logtypes:logtype, {Float,_}:...) - { - // WARNING: Don't try to use assert in here; it uses this func - - // Don't log debug if not in debug mode - #if !XS_DEBUG - if (logtype == xs_debug) - return; - #endif - - new buffer[XS_LOGBUFFER_SIZE+1]; - buffer[XS_LOGBUFFER_SIZE]=0; - format_args(buffer, XS_LOGBUFFER_SIZE, 1 /* go from SECOND argument*/); - new bool:addLogTypeName = strlen(xs__logtypenames[logtype]) ? true : false; - - // Use AMXX's logging system - log_amx("%s%s%s", addLogTypeName ? xs__logtypenames[logtype] : "", - addLogTypeName ? ": " : "", buffer); - } - - // Assertion - // tested - XS_LIBFUNC_ATTRIB xs_assertfunc({Float,_}:exp, const desc[]) - { - // Check exp - if (exp) - return 1; // ok - - // not ok - - // print info - xs_log(xs__assertionfailed, "%s", desc); - - return 0; - } - #define xs_assert(%1,%2) if (!xs_assertfunc(%1,%2)) xs__global_null /= xs__global_null - - - // Assertion; only in debug mode - // untested; logical flow says it should work - #if XS_DEBUG - #define xs_assert_dbg(%1,%2) if (!xs_assertfunc(%1,%2)) xs__global_null /= xs__global_null - #else - #define xs_assert_dbg(%1,%2) + // Don't log debug if not in debug mode + #if !XS_DEBUG + if (logtype == xs_debug) + return; #endif - new xs__global_null = 0; + new buffer[XS_LOGBUFFER_SIZE+1]; + buffer[XS_LOGBUFFER_SIZE]=0; + format_args(buffer, XS_LOGBUFFER_SIZE, 1 /* go from SECOND argument*/); + new bool:addLogTypeName = strlen(xs__logtypenames[logtype]) ? true : false; + // Use AMXX's logging system + log_amx("%s%s%s", addLogTypeName ? xs__logtypenames[logtype] : "", + addLogTypeName ? ": " : "", buffer); +} + +// Assertion +// tested +stock xs_assertfunc({Float,_}:exp, const desc[]) +{ + // Check exp + if (exp) + return 1; // ok + + // not ok + + // print info + xs_log(xs__assertionfailed, "%s", desc); + + return 0; +} +#define xs_assert(%1,%2) if (!xs_assertfunc(%1,%2)) xs__global_null /= xs__global_null + + +// Assertion; only in debug mode +// untested; logical flow says it should work +#if XS_DEBUG + #define xs_assert_dbg(%1,%2) if (!xs_assertfunc(%1,%2)) xs__global_null /= xs__global_null +#else + #define xs_assert_dbg(%1,%2) +#endif + +new xs__global_null = 0; + /****** MATH FUNCTIONS ******/ - /****** BASIC STUFF ******/ - - // Returns -1 if num is negative, 0 if num is 0, 1 if num is positive - // tested - XS_LIBFUNC_ATTRIB xs_sign(num) - { - return (num < 0) ? -1 : ((num == 0) ? 0 : 1); - } - - // Returns -1 if num is negative, 0 if num is 0, 1 if num is positive - // tested - XS_LIBFUNC_ATTRIB xs_fsign(Float:num) - { - return (num < 0.0) ? -1 : ((num == 0.0) ? 0 : 1); - } - - // Returns absolute value - // tested - XS_LIBFUNC_ATTRIB xs_abs(num) - { - return (num < 0) ? -num : num; - } - - // is power of 2? (== can be expressed as 1<= ((%2) - XS_FLEQ_TOLERANCE))) +/****** BASIC STUFF ******/ - // 1/sqrt - // tested - XS_LIBFUNC_ATTRIB Float:xs_rsqrt(Float:x) - { - return 1.0 / floatsqroot(x); - } - - // sqrt - // tested - XS_LIBFUNC_ATTRIB Float:xs_sqrt(Float:x) - { - return floatsqroot(x); - } - - // These functions generate errors if you use the macros with wrong parameter count. - stock Float:xs_fabs(Float:pa) - { - #pragma unused pa - new rawr = you_need_one_param_for_fabs; - rawr = warning_below_shows_line_number; - #pragma unused rawr - } - stock Float:xs_asin(Float:pa,Float:pb) - { - #pragma unused pa,pb - new rawr = you_need_two_params_for_asin; - rawr = warning_below_shows_line_number; - #pragma unused rawr - } - stock Float:xs_sin(Float:pa,Float:pb) - { - #pragma unused pa,pb - new rawr = you_need_two_params_for_sin; - #pragma unused rawr - } - stock Float:xs_acos(Float:pa,Float:pb) - { - #pragma unused pa,pb - new rawr = you_need_two_params_for_acos; - rawr = warning_below_shows_line_number; - #pragma unused rawr - } - stock Float:xs_cos(Float:pa,Float:pb) - { - #pragma unused pa,pb - new rawr = you_need_two_params_for_cos; - rawr = warning_below_shows_line_number; - #pragma unused rawr - } - stock Float:xs_atan(Float:pa,Float:pb) - { - #pragma unused pa,pb - new rawr = you_need_two_params_for_atan; - rawr = warning_below_shows_line_number; - #pragma unused rawr - } - stock Float:xs_atan2(Float:pa,Float:pb) - { - #pragma unused pa,pb - new rawr = you_need_two_params_for_atan2; - rawr = warning_below_shows_line_number; - #pragma unused rawr - } - stock Float:xs_tan(Float:pa, Float:pb) - { - #pragma unused pa,pb - new rawr = you_need_two_params_for_tan; - rawr = warning_below_shows_line_number; - #pragma unused rawr - } - - #define xs_fabs(%1) floatabs(%1) - #define xs_asin(%1,%2) floatasin(%1, %2) - #define xs_sin(%1,%2) floatsin(%1, %2) - #define xs_acos(%1,%2) floatacos(%1, %2) - #define xs_cos(%1,%2) floatcos(%1, %2) - #define xs_atan(%1,%2) floatatan(%1, %2) - #define xs_atan2(%1,%2) floatatan2(%1, %2) - #define xs_tan(%1,%2) floattan(%1, %2) - - /****** RANDOM NUMBERS ******/ - // This routine comes from the book "Inner Loops" by Rick Booth, Addison-Wesley - // (ISBN 0-201-47960-5). This is a "multiplicative congruential random number - // generator" that has been extended to 31-bits - - XS_LIBVAR_ATTRIB xs__internalseed=0x546875; - - #define XS__IL_RMULT 1103515245 - - // tested - XS_LIBFUNC_ATTRIB xs_seed(seed) - { - xs__internalseed = seed; - } - - // tested - XS_LIBFUNC_ATTRIB xs_irand() - { - new lo, hi, ll, lh, hh, hl; - new result; - - lo = xs__internalseed & 0xffff; - hi = xs__internalseed >> 16; - xs__internalseed = xs__internalseed * XS__IL_RMULT + 12345; - ll = lo * (XS__IL_RMULT & 0xffff); - lh = lo * (XS__IL_RMULT >> 16 ); - hl = hi * (XS__IL_RMULT & 0xffff); - hh = hi * (XS__IL_RMULT >> 16 ); - result = xs_abs(((ll + 12345) >> 16) + lh + hl + (hh << 16)); - return result; - } - - // tested - XS_LIBFUNC_ATTRIB Float:xs_frand() - { - return float(xs_irand()) / float(xs_get_maxnum()); // -1/2 should be the biggest possible positive number - } - - // tested - XS_LIBFUNC_ATTRIB xs_irand_range(pmin, pmax) - { - xs_assert_dbg(pmax - pmin >= 0, "xs_irand_range: pmin > pmax"); - new i = pmin + floatround(xs_frand() * float(pmax - pmin)); - if (i > pmax) - i = pmax; - return i; - } - - /****** VECTORS & PLANES ******/ +// Returns -1 if num is negative, 0 if num is 0, 1 if num is positive +// tested +stock xs_sign(num) +{ + return (num < 0) ? -1 : ((num == 0) ? 0 : 1); +} - // *** vectors +// Returns -1 if num is negative, 0 if num is 0, 1 if num is positive +// tested +stock xs_fsign(Float:num) +{ + return (num < 0.0) ? -1 : ((num == 0.0) ? 0 : 1); +} + +// Returns absolute value +// tested +stock xs_abs(num) +{ + return (num < 0) ? -num : num; +} + +// is power of 2? (== can be expressed as 1<= ((%2) - XS_FLEQ_TOLERANCE))) + +// 1/sqrt +// tested +stock Float:xs_rsqrt(Float:x) +{ + return 1.0 / floatsqroot(x); +} + +// sqrt +// tested +stock Float:xs_sqrt(Float:x) +{ + return floatsqroot(x); +} + +// These functions generate errors if you use the macros with wrong parameter count. +stock Float:xs_fabs(Float:pa) +{ + #pragma unused pa + new rawr = you_need_one_param_for_fabs; + rawr = warning_below_shows_line_number; + #pragma unused rawr +} +stock Float:xs_asin(Float:pa,Float:pb) +{ + #pragma unused pa,pb + new rawr = you_need_two_params_for_asin; + rawr = warning_below_shows_line_number; + #pragma unused rawr +} +stock Float:xs_sin(Float:pa,Float:pb) +{ + #pragma unused pa,pb + new rawr = you_need_two_params_for_sin; + #pragma unused rawr +} +stock Float:xs_acos(Float:pa,Float:pb) +{ + #pragma unused pa,pb + new rawr = you_need_two_params_for_acos; + rawr = warning_below_shows_line_number; + #pragma unused rawr +} +stock Float:xs_cos(Float:pa,Float:pb) +{ + #pragma unused pa,pb + new rawr = you_need_two_params_for_cos; + rawr = warning_below_shows_line_number; + #pragma unused rawr +} +stock Float:xs_atan(Float:pa,Float:pb) +{ + #pragma unused pa,pb + new rawr = you_need_two_params_for_atan; + rawr = warning_below_shows_line_number; + #pragma unused rawr +} +stock Float:xs_atan2(Float:pa,Float:pb) +{ + #pragma unused pa,pb + new rawr = you_need_two_params_for_atan2; + rawr = warning_below_shows_line_number; + #pragma unused rawr +} +stock Float:xs_tan(Float:pa, Float:pb) +{ + #pragma unused pa,pb + new rawr = you_need_two_params_for_tan; + rawr = warning_below_shows_line_number; + #pragma unused rawr +} + +#define xs_fabs(%1) floatabs(%1) +#define xs_asin(%1,%2) floatasin(%1, %2) +#define xs_sin(%1,%2) floatsin(%1, %2) +#define xs_acos(%1,%2) floatacos(%1, %2) +#define xs_cos(%1,%2) floatcos(%1, %2) +#define xs_atan(%1,%2) floatatan(%1, %2) +#define xs_atan2(%1,%2) floatatan2(%1, %2) +#define xs_tan(%1,%2) floattan(%1, %2) + +/****** RANDOM NUMBERS ******/ +// This routine comes from the book "Inner Loops" by Rick Booth, Addison-Wesley +// (ISBN 0-201-47960-5). This is a "multiplicative congruential random number +// generator" that has been extended to 31-bits + +stock xs__internalseed=0x546875; + +#define XS__IL_RMULT 1103515245 + +// tested +stock xs_seed(seed) +{ + xs__internalseed = seed; +} + +// tested +stock xs_irand() +{ + new lo, hi, ll, lh, hh, hl; + new result; - // Set vec components to values - // tested - XS_LIBFUNC_ATTRIB xs_vec_set(Float:vec[], Float:x, Float:y, Float:z) - { - vec[0] = x; - vec[1] = y; - vec[2] = z; - } + lo = xs__internalseed & 0xffff; + hi = xs__internalseed >> 16; + xs__internalseed = xs__internalseed * XS__IL_RMULT + 12345; + ll = lo * (XS__IL_RMULT & 0xffff); + lh = lo * (XS__IL_RMULT >> 16 ); + hl = hi * (XS__IL_RMULT & 0xffff); + hh = hi * (XS__IL_RMULT >> 16 ); + result = xs_abs(((ll + 12345) >> 16) + lh + hl + (hh << 16)); + return result; +} + +// tested +stock Float:xs_frand() +{ + return float(xs_irand()) / float(xs_get_maxnum()); // -1/2 should be the biggest possible positive number +} + +// tested +stock xs_irand_range(pmin, pmax) +{ + xs_assert_dbg(pmax - pmin >= 0, "xs_irand_range: pmin > pmax"); + new i = pmin + floatround(xs_frand() * float(pmax - pmin)); + if (i > pmax) + i = pmax; + return i; +} + +/****** VECTORS & PLANES ******/ + +// *** vectors + +// Set vec components to values +// tested +stock xs_vec_set(Float:vec[], Float:x, Float:y, Float:z) +{ + vec[0] = x; + vec[1] = y; + vec[2] = z; +} + +// Add vec +// tested +stock xs_vec_add(const Float:in1[], const Float:in2[], Float:out[]) +{ + out[0] = in1[0] + in2[0]; + out[1] = in1[1] + in2[1]; + out[2] = in1[2] + in2[2]; +} + +// Subtract vec +// untested, but should work +stock xs_vec_sub(const Float:in1[], const Float:in2[], Float:out[]) +{ + out[0] = in1[0] - in2[0]; + out[1] = in1[1] - in2[1]; + out[2] = in1[2] - in2[2]; +} + +// Are vectors equal? +// untested, but should work +stock bool:xs_vec_equal(const Float:vec1[], const Float:vec2[]) +{ + return (vec1[0] == vec2[0]) && (vec1[1] == vec2[1]) && (vec1[2] == vec2[2]); +} + +// Are vectors nearly equal? +// tested +stock bool:xs_vec_nearlyequal(const Float:vec1[], const Float:vec2[]) +{ + return XS_FLEQ(vec1[0], vec2[0]) && XS_FLEQ(vec1[1], vec2[1]) && XS_FLEQ(vec1[2], vec2[2]); +} + +// multiply vector by scalar +// tested +stock xs_vec_mul_scalar(const Float:vec[], Float:scalar, Float:out[]) +{ + out[0] = vec[0] * scalar; + out[1] = vec[1] * scalar; + out[2] = vec[2] * scalar; +} + +// divide vector by scalar +// untested, but should work +stock xs_vec_div_scalar(const Float:vec[], Float:scalar, Float:out[]) +{ + new Float:__tmp = 1.0 / scalar; + out[0] = vec[0] * __tmp; + out[1] = vec[1] * __tmp; + out[2] = vec[2] * __tmp; +} + +// Compute vector length +// tested +stock Float:xs_vec_len(const Float:vec[]) +{ + return xs_sqrt(vec[0]*vec[0] + vec[1]*vec[1] + vec[2]*vec[2]); +} + +// Normalize vec +// tested +stock xs_vec_normalize(const Float:vec[], Float:out[]) +{ + new Float:invlen = xs_rsqrt(vec[0]*vec[0] + vec[1]*vec[1] + vec[2]*vec[2]); + out[0] = vec[0] * invlen; + out[1] = vec[1] * invlen; + out[2] = vec[2] * invlen; +} + +// Store the cross product of vec1 and vec2 in out +// tested +stock xs_vec_cross(const Float:vec1[], const Float:vec2[], Float:out[]) +{ + out[0] = vec1[1]*vec2[2] - vec1[2]*vec2[1]; + out[1] = vec1[2]*vec2[0] - vec1[0]*vec2[2]; + out[2] = vec1[0]*vec2[1] - vec1[1]*vec2[0]; +} + +// Compute vec1 dot vec2 +// tested +stock Float:xs_vec_dot(const Float:vec1[], const Float:vec2[]) +{ + return vec1[0]*vec2[0] + vec1[1]*vec2[1] + vec1[2]*vec2[2]; +} + +// Negate vec into out +// untested, but should work +stock xs_vec_neg(const Float:vec[], Float:out[]) +{ + out[0] = -vec[0]; + out[1] = -vec[1]; + out[2] = -vec[2]; +} + +// Copy vec +// untested, but should work +stock xs_vec_copy(const Float:vecIn[], Float:vecOut[]) +{ + vecOut[0] = vecIn[0]; + vecOut[1] = vecIn[1]; + vecOut[2] = vecIn[2]; +} + +// Compute angle between vec1 and vec2 +// tested +stock Float:xs_vec_angle(const Float:vec1[], const Float:vec2[]) +{ + return xs_rad2deg(xs_acos(xs_vec_dot(vec1, vec2), radian)); +} + +// Reflect vec about normal +// untested +stock xs_vec_reflect(const Float:vec[], const Float:normal[], Float:out[]) +{ + // normalize(vec) - (normal * 2.0 * (tmp . normal)) * length(vec) - // Add vec - // tested - XS_LIBFUNC_ATTRIB xs_vec_add(const Float:in1[], const Float:in2[], Float:out[]) - { - out[0] = in1[0] + in2[0]; - out[1] = in1[1] + in2[1]; - out[2] = in1[2] + in2[2]; - } + new Float:tmp1[3]; + xs_vec_normalize(vec, tmp1); - // Subtract vec - // untested, but should work - XS_LIBFUNC_ATTRIB xs_vec_sub(const Float:in1[], const Float:in2[], Float:out[]) - { - out[0] = in1[0] - in2[0]; - out[1] = in1[1] - in2[1]; - out[2] = in1[2] - in2[2]; - } + // tmp1 - (normal * 2.0 * (tmp . normal)) * length(vec) - // Are vectors equal? - // untested, but should work - XS_LIBFUNC_ATTRIB bool:xs_vec_equal(const Float:vec1[], const Float:vec2[]) - { - return (vec1[0] == vec2[0]) && (vec1[1] == vec2[1]) && (vec1[2] == vec2[2]); - } + new Float:tmp2[3]; + xs_vec_mul_scalar(normal, 2.0, tmp2); + xs_vec_mul_scalar(tmp2, xs_vec_dot(tmp1, normal), tmp2); - // Are vectors nearly equal? - // tested - XS_LIBFUNC_ATTRIB bool:xs_vec_nearlyequal(const Float:vec1[], const Float:vec2[]) - { - return XS_FLEQ(vec1[0], vec2[0]) && XS_FLEQ(vec1[1], vec2[1]) && XS_FLEQ(vec1[2], vec2[2]); - } + // tmp1 - tmp2 * length(vec) + xs_vec_mul_scalar(tmp2, xs_vec_len(vec), tmp2); - // multiply vector by scalar - // tested - XS_LIBFUNC_ATTRIB xs_vec_mul_scalar(const Float:vec[], Float:scalar, Float:out[]) - { - out[0] = vec[0] * scalar; - out[1] = vec[1] * scalar; - out[2] = vec[2] * scalar; - } - - // divide vector by scalar - // untested, but should work - XS_LIBFUNC_ATTRIB xs_vec_div_scalar(const Float:vec[], Float:scalar, Float:out[]) - { - new Float:__tmp = 1.0 / scalar; - out[0] = vec[0] * __tmp; - out[1] = vec[1] * __tmp; - out[2] = vec[2] * __tmp; - } - - // Compute vector length - // tested - XS_LIBFUNC_ATTRIB Float:xs_vec_len(const Float:vec[]) - { - return xs_sqrt(vec[0]*vec[0] + vec[1]*vec[1] + vec[2]*vec[2]); - } - - // Normalize vec - // tested - XS_LIBFUNC_ATTRIB xs_vec_normalize(const Float:vec[], Float:out[]) - { - new Float:invlen = xs_rsqrt(vec[0]*vec[0] + vec[1]*vec[1] + vec[2]*vec[2]); - out[0] = vec[0] * invlen; - out[1] = vec[1] * invlen; - out[2] = vec[2] * invlen; - } - - // Store the cross product of vec1 and vec2 in out - // tested - XS_LIBFUNC_ATTRIB xs_vec_cross(const Float:vec1[], const Float:vec2[], Float:out[]) - { - out[0] = vec1[1]*vec2[2] - vec1[2]*vec2[1]; - out[1] = vec1[2]*vec2[0] - vec1[0]*vec2[2]; - out[2] = vec1[0]*vec2[1] - vec1[1]*vec2[0]; - } - - // Compute vec1 dot vec2 - // tested - XS_LIBFUNC_ATTRIB Float:xs_vec_dot(const Float:vec1[], const Float:vec2[]) - { - return vec1[0]*vec2[0] + vec1[1]*vec2[1] + vec1[2]*vec2[2]; - } - - // Negate vec into out - // untested, but should work - XS_LIBFUNC_ATTRIB xs_vec_neg(const Float:vec[], Float:out[]) - { - out[0] = -vec[0]; - out[1] = -vec[1]; - out[2] = -vec[2]; - } - - // Copy vec - // untested, but should work - XS_LIBFUNC_ATTRIB xs_vec_copy(const Float:vecIn[], Float:vecOut[]) - { - vecOut[0] = vecIn[0]; - vecOut[1] = vecIn[1]; - vecOut[2] = vecIn[2]; - } - - // Compute angle between vec1 and vec2 - // tested - XS_LIBFUNC_ATTRIB Float:xs_vec_angle(const Float:vec1[], const Float:vec2[]) - { - return xs_rad2deg(xs_acos(xs_vec_dot(vec1, vec2), radian)); - } - - // Reflect vec about normal - // untested - XS_LIBFUNC_ATTRIB xs_vec_reflect(const Float:vec[], const Float:normal[], Float:out[]) - { - // normalize(vec) - (normal * 2.0 * (tmp . normal)) * length(vec) - - new Float:tmp1[3]; - xs_vec_normalize(vec, tmp1); - - // tmp1 - (normal * 2.0 * (tmp . normal)) * length(vec) - - new Float:tmp2[3]; - xs_vec_mul_scalar(normal, 2.0, tmp2); - xs_vec_mul_scalar(tmp2, xs_vec_dot(tmp1, normal), tmp2); - - // tmp1 - tmp2 * length(vec) - xs_vec_mul_scalar(tmp2, xs_vec_len(vec), tmp2); - - // tmp1 - tmp2 - xs_vec_sub(tmp1, tmp2, out); - } - - // Turn a 3D vector into a 2D vector - XS_LIBFUNC_ATTRIB xs_vec_make2d(const Float:vec[3], Float:out[2]) - { - out[0] = vec[0]; - out[1] = vec[1]; - } - - // *** planes - - // normal - #define XS_PLANE_A 0 - #define XS_PLANE_B 1 - #define XS_PLANE_C 2 - // plane shift distance - #define XS_PLANE_D 3 + // tmp1 - tmp2 + xs_vec_sub(tmp1, tmp2, out); +} + +// Turn a 3D vector into a 2D vector +stock xs_vec_make2d(const Float:vec[3], Float:out[2]) +{ + out[0] = vec[0]; + out[1] = vec[1]; +} + +// *** planes + +// normal +#define XS_PLANE_A 0 +#define XS_PLANE_B 1 +#define XS_PLANE_C 2 +// plane shift distance +#define XS_PLANE_D 3 - // Set a plane to specific values - // tested - XS_LIBFUNC_ATTRIB xs_plane_set(Float:plane[], Float:a, Float:b, Float:c, Float:d) - { - plane[XS_PLANE_A] = a; - plane[XS_PLANE_B] = b; - plane[XS_PLANE_C] = c; - plane[XS_PLANE_D] = d; - } +// Set a plane to specific values +// tested +stock xs_plane_set(Float:plane[], Float:a, Float:b, Float:c, Float:d) +{ + plane[XS_PLANE_A] = a; + plane[XS_PLANE_B] = b; + plane[XS_PLANE_C] = c; + plane[XS_PLANE_D] = d; +} + +// Construct a plane out of 3 points +// tested +stock xs_plane_3p(Float:plane[], const Float:p1[], const Float:p2[], const Float:p3[]) +{ + new Float:normalA[3], Float:normalB[3]; - // Construct a plane out of 3 points - // tested - XS_LIBFUNC_ATTRIB xs_plane_3p(Float:plane[], const Float:p1[], const Float:p2[], const Float:p3[]) - { - new Float:normalA[3], Float:normalB[3]; - - // normalA = Normalize(p3 - p1); - normalA[0] = p3[0] - p1[0]; - normalA[1] = p3[1] - p1[1]; - normalA[2] = p3[2] - p1[2]; - xs_vec_normalize(normalA, normalA); - - // normalB = Normalize(p3 - p2); - normalB[0] = p3[0] - p2[0]; - normalB[1] = p3[1] - p2[1]; - normalB[2] = p3[2] - p2[2]; - xs_vec_normalize(normalB, normalB); - - // plane normal = Normalize(normalA cross normalB) - xs_vec_cross(normalA, normalB, plane); - xs_vec_normalize(plane, plane); - - // plane shift distance = (-p1) dot plane normal - new Float:__tmp[3]; - xs_vec_neg(plane, __tmp); - plane[XS_PLANE_D] = xs_vec_dot(__tmp, p1); - - } + // normalA = Normalize(p3 - p1); + normalA[0] = p3[0] - p1[0]; + normalA[1] = p3[1] - p1[1]; + normalA[2] = p3[2] - p1[2]; + xs_vec_normalize(normalA, normalA); - // untested, but should work - XS_LIBFUNC_ATTRIB bool:xs_plane_equal(const Float:plane1[], const Float:plane2[]) - { - if ( (plane1[0] == plane2[0]) && - (plane1[1] == plane2[1]) && - (plane1[2] == plane2[2]) && - (plane1[3] == plane2[3])) - return true; - return false; - } + // normalB = Normalize(p3 - p2); + normalB[0] = p3[0] - p2[0]; + normalB[1] = p3[1] - p2[1]; + normalB[2] = p3[2] - p2[2]; + xs_vec_normalize(normalB, normalB); - // untested, but should work - XS_LIBFUNC_ATTRIB bool:xs_plane_nearlyequal(const Float:plane1[], const Float:plane2[]) - { - if ( XS_FLEQ(plane1[0], plane2[0]) && - XS_FLEQ(plane1[1], plane2[1]) && - XS_FLEQ(plane1[2], plane2[2]) && - XS_FLEQ(plane1[3], plane2[3])) - return true; - return false; - } + // plane normal = Normalize(normalA cross normalB) + xs_vec_cross(normalA, normalB, plane); + xs_vec_normalize(plane, plane); - // Compute distance between plane and point - // tested - XS_LIBFUNC_ATTRIB Float:xs_plane_dst2point(const Float:plane[], const Float:point[]) - { - // return normal dot point + D - return xs_vec_dot(plane, point) + plane[XS_PLANE_D]; - } + // plane shift distance = (-p1) dot plane normal + new Float:__tmp[3]; + xs_vec_neg(plane, __tmp); + plane[XS_PLANE_D] = xs_vec_dot(__tmp, p1); - // Checks whether plane intersects with the ray starting and rayStart and going to rayDir direction. - // If yes, returns true and sets out to the intersection point - // Otherwise, returns false - // tested - XS_LIBFUNC_ATTRIB bool:xs_plane_rayintersect(const Float:plane[], const Float:rayStart[], const Float:rayDir[], Float:out[]) - { - new Float:a = xs_vec_dot(plane, rayDir); - - if (a == 0.0) - return false; // ray is parallel to plane - - // if (distance plane<->(rayStart + rayDir) > distance plane<->rayStart) and both have the same sign, the ray - // goes away from the plane - new Float:rsplusrd[3]; - xs_vec_add(rayStart, rayDir, rsplusrd); - new Float:dst1 = xs_plane_dst2point(plane, rsplusrd); - new Float:dst2 = xs_plane_dst2point(plane, rayStart); - if (xs_fabs(dst1) > xs_fabs(dst2) && xs_fsign(dst1) == xs_fsign(dst2)) - return false; - - - // out = rayStart - rayDir * ((distance plane<->rayStart) / a) - new Float:__tmp[3]; - xs_vec_mul_scalar(rayDir, xs_plane_dst2point(plane, rayStart) / a, __tmp); - // out = rayStart - tmp - xs_vec_sub(rayStart, __tmp, out); - +} + +// untested, but should work +stock bool:xs_plane_equal(const Float:plane1[], const Float:plane2[]) +{ + if ( (plane1[0] == plane2[0]) && + (plane1[1] == plane2[1]) && + (plane1[2] == plane2[2]) && + (plane1[3] == plane2[3])) return true; - } - - // Is point on plane? - // tested - XS_LIBFUNC_ATTRIB bool:xs_point_onplane(const Float:plane[], const Float:point[]) - { - return XS_FLEQ(xs_plane_dst2point(plane, point), 0.0); - } - - // Project point on plane - // tested - XS_LIBFUNC_ATTRIB xs_projpoint_onplane(const Float:plane[], const Float:point[], Float:out[]) - { - new Float:__tmp[3]; - // out = point - (plane normal * distance point<->plane) - xs_vec_copy(plane, __tmp); - xs_vec_mul_scalar(__tmp, xs_plane_dst2point(plane, point), __tmp); - xs_vec_sub(point, __tmp, out); - } - - // Copy plane - // untested, but should work - XS_LIBFUNC_ATTRIB xs_plane_copy(const Float:planeIn[], Float:planeOut[]) - { - planeOut[0] = planeIn[0]; - planeOut[1] = planeIn[1]; - planeOut[2] = planeIn[2]; - planeOut[3] = planeIn[3]; - } + return false; +} - /****** HL ENGINE SPECIFIC STUFF ******/ - // Compute forward, right and up vector from angles - // half-tested - - // angle indexes - #define XS_PITCH 0 // up / down - #define XS_YAW 1 // left / right - #define XS_ROLL 2 // fall over +// untested, but should work +stock bool:xs_plane_nearlyequal(const Float:plane1[], const Float:plane2[]) +{ + if ( XS_FLEQ(plane1[0], plane2[0]) && + XS_FLEQ(plane1[1], plane2[1]) && + XS_FLEQ(plane1[2], plane2[2]) && + XS_FLEQ(plane1[3], plane2[3])) + return true; + return false; +} - XS_LIBFUNC_ATTRIB xs_anglevectors(const Float:angles[3], Float:fwd[3], Float:right[3], Float:up[3]) - { - // sin (s) and cos (c) for yaw (y), pitch (p) and roll (r) - new Float:sr, Float:sp, Float:sy, Float:cr, Float:cp, Float:cy; - - sy = xs_sin(angles[XS_YAW], degrees); - cy = xs_cos(angles[XS_YAW], degrees); - sp = xs_sin(angles[XS_PITCH], degrees); - cp = xs_cos(angles[XS_PITCH], degrees); - sr = xs_sin(angles[XS_ROLL], degrees); - cr = xs_cos(angles[XS_ROLL], degrees); - - fwd[0] = cp*cy; - fwd[1] = cp*sy; - fwd[2] = -sp; - - right[0] = (-1*sr*sp*cy + -1*cr*-sy); - right[1] = (-1*sr*sp*sy + -1*cr*cy); - right[2] = -1*sr*cp; - - up[0] = (cr*sp*cy + -sr*-sy); - up[1] = (cr*sp*sy + -sr*cy); - up[2] = cr*cp; - } +// Compute distance between plane and point +// tested +stock Float:xs_plane_dst2point(const Float:plane[], const Float:point[]) +{ + // return normal dot point + D + return xs_vec_dot(plane, point) + plane[XS_PLANE_D]; +} + +// Checks whether plane intersects with the ray starting and rayStart and going to rayDir direction. +// If yes, returns true and sets out to the intersection point +// Otherwise, returns false +// tested +stock bool:xs_plane_rayintersect(const Float:plane[], const Float:rayStart[], const Float:rayDir[], Float:out[]) +{ + new Float:a = xs_vec_dot(plane, rayDir); + + if (a == 0.0) + return false; // ray is parallel to plane + + // if (distance plane<->(rayStart + rayDir) > distance plane<->rayStart) and both have the same sign, the ray + // goes away from the plane + new Float:rsplusrd[3]; + xs_vec_add(rayStart, rayDir, rsplusrd); + new Float:dst1 = xs_plane_dst2point(plane, rsplusrd); + new Float:dst2 = xs_plane_dst2point(plane, rayStart); + if (xs_fabs(dst1) > xs_fabs(dst2) && xs_fsign(dst1) == xs_fsign(dst2)) + return false; + + + // out = rayStart - rayDir * ((distance plane<->rayStart) / a) + new Float:__tmp[3]; + xs_vec_mul_scalar(rayDir, xs_plane_dst2point(plane, rayStart) / a, __tmp); + // out = rayStart - tmp + xs_vec_sub(rayStart, __tmp, out); + + return true; +} + +// Is point on plane? +// tested +stock bool:xs_point_onplane(const Float:plane[], const Float:point[]) +{ + return XS_FLEQ(xs_plane_dst2point(plane, point), 0.0); +} + +// Project point on plane +// tested +stock xs_projpoint_onplane(const Float:plane[], const Float:point[], Float:out[]) +{ + new Float:__tmp[3]; + // out = point - (plane normal * distance point<->plane) + xs_vec_copy(plane, __tmp); + xs_vec_mul_scalar(__tmp, xs_plane_dst2point(plane, point), __tmp); + xs_vec_sub(point, __tmp, out); +} + +// Copy plane +// untested, but should work +stock xs_plane_copy(const Float:planeIn[], Float:planeOut[]) +{ + planeOut[0] = planeIn[0]; + planeOut[1] = planeIn[1]; + planeOut[2] = planeIn[2]; + planeOut[3] = planeIn[3]; +} + +/****** HL ENGINE SPECIFIC STUFF ******/ +// Compute forward, right and up vector from angles +// half-tested + +// angle indexes +#define XS_PITCH 0 // up / down +#define XS_YAW 1 // left / right +#define XS_ROLL 2 // fall over + +stock xs_anglevectors(const Float:angles[3], Float:fwd[3], Float:right[3], Float:up[3]) +{ + // sin (s) and cos (c) for yaw (y), pitch (p) and roll (r) + new Float:sr, Float:sp, Float:sy, Float:cr, Float:cp, Float:cy; + + sy = xs_sin(angles[XS_YAW], degrees); + cy = xs_cos(angles[XS_YAW], degrees); + sp = xs_sin(angles[XS_PITCH], degrees); + cp = xs_cos(angles[XS_PITCH], degrees); + sr = xs_sin(angles[XS_ROLL], degrees); + cr = xs_cos(angles[XS_ROLL], degrees); + + fwd[0] = cp*cy; + fwd[1] = cp*sy; + fwd[2] = -sp; + + right[0] = (-1*sr*sp*cy + -1*cr*-sy); + right[1] = (-1*sr*sp*sy + -1*cr*cy); + right[2] = -1*sr*cp; + + up[0] = (cr*sp*cy + -sr*-sy); + up[1] = (cr*sp*sy + -sr*cy); + up[2] = cr*cp; +} /****** STRING FUNCS *******/ - // tested - XS_LIBFUNC_ATTRIB xs_strchr(const str[], chr) +// tested +stock xs_strchr(const str[], chr) +{ + for (new i = 0; str[i] != 0; ++i) { - for (new i = 0; str[i] != 0; ++i) - { - if (str[i] == chr) - return i; - } - return -1; + if (str[i] == chr) + return i; } + return -1; +} + +// by JGHG, adapted +// removes charstotrim number of charactes from stringtotrim's +// - beginning if fromleft is true +// - end if fromleft is false +// tested +stock xs_strtrim(stringtotrim[], charstotrim, bool:fromleft = true) +{ + if (charstotrim <= 0) + return; - // by JGHG, adapted - // removes charstotrim number of charactes from stringtotrim's - // - beginning if fromleft is true - // - end if fromleft is false - // tested - XS_LIBFUNC_ATTRIB xs_strtrim(stringtotrim[], charstotrim, bool:fromleft = true) + if (fromleft) { - if (charstotrim <= 0) - return; - - if (fromleft) - { - new maxlen = strlen(stringtotrim); - if (charstotrim > maxlen) - charstotrim = maxlen; + new maxlen = strlen(stringtotrim); + if (charstotrim > maxlen) + charstotrim = maxlen; - // In format, input and output regions can overlap - format(stringtotrim, maxlen, "%s", stringtotrim[charstotrim]); - } - else - { - new maxlen = strlen(stringtotrim) - charstotrim; - if (maxlen < 0) - maxlen = 0; - - // In format, input and output regions can overlap - format(stringtotrim, maxlen, "%s", stringtotrim); - } + // In format, input and output regions can overlap + format(stringtotrim, maxlen, "%s", stringtotrim[charstotrim]); } - - // by xeroblood, adapted - // copies characters from oldmsg to newmsg, starting at start and ending at end (_includes_ end). - // terminates newmsg with 0 - // if outlen is positive, it specifies the maximal number of characters to be copied. - // otherwise, assumes that newmsg is at least end-start+1 characters long. - // tested - XS_LIBFUNC_ATTRIB xs_strmid(const oldmsg[], newmsg[], start, end, outlen=-1) + else { - new len = strlen(oldmsg); - - if(start < 0) - start = 0; - - ++end; // Include end - - if(end <= start || end > len) - end = len; + new maxlen = strlen(stringtotrim) - charstotrim; + if (maxlen < 0) + maxlen = 0; - new j = 0, i = start; - for(; (i < end) && (outlen--);) - newmsg[j++] = oldmsg[i++]; - - newmsg[j] = 0; + // In format, input and output regions can overlap + format(stringtotrim, maxlen, "%s", stringtotrim); } - - // by xeroblood, adapted - // maxelems: maximal number of elements in output, elemsize: maximal size of one element - // tested - XS_LIBFUNC_ATTRIB xs_explode(const input[], output[][], delimiter, maxelems, elemsize) - { - new nIdx = 0; - new nLen = 0; +} - new copied = 0; - while(nLen < strlen(input) && nIdx < maxelems) +// by xeroblood, adapted +// copies characters from oldmsg to newmsg, starting at start and ending at end (_includes_ end). +// terminates newmsg with 0 +// if outlen is positive, it specifies the maximal number of characters to be copied. +// otherwise, assumes that newmsg is at least end-start+1 characters long. +// tested +stock xs_strmid(const oldmsg[], newmsg[], start, end, outlen=-1) +{ + new len = strlen(oldmsg); + + if(start < 0) + start = 0; + + ++end; // Include end + + if(end <= start || end > len) + end = len; + + new j = 0, i = start; + for(; (i < end) && (outlen--);) + newmsg[j++] = oldmsg[i++]; + + newmsg[j] = 0; +} + +// by xeroblood, adapted +// maxelems: maximal number of elements in output, elemsize: maximal size of one element +// tested +stock xs_explode(const input[], output[][], delimiter, maxelems, elemsize) +{ + new nIdx = 0; + new nLen = 0; + + new copied = 0; + while(nLen < strlen(input) && nIdx < maxelems) + { + copied = copyc(output[nIdx++], elemsize, input[nLen], delimiter); + if (copied == elemsize) { - copied = copyc(output[nIdx++], elemsize, input[nLen], delimiter); - if (copied == elemsize) + // maybe it got force-stopped because of maxsize + // so check whether we have to skip something + if (input[nLen + copied] != delimiter && input[nLen + copied] != 0) { - // maybe it got force-stopped because of maxsize - // so check whether we have to skip something - if (input[nLen + copied] != delimiter && input[nLen + copied] != 0) - { - new found = xs_strchr(input[nLen + copied], delimiter); - if (found == -1) - break; - copied += found; - } + new found = xs_strchr(input[nLen + copied], delimiter); + if (found == -1) + break; + copied += found; } - - nLen += copied + 1; // +1: skip delimiter - } - return nIdx; - } - - // returns number of cells written. - XS_LIBFUNC_ATTRIB xs_implode(output[], outsize, delimiter, const input[][], elemsnum) - { - new pos = 0; - new copied; - for (new i = 0; i < elemsnum; ++i) - { - copied = copy(output[pos], outsize - pos, input[i]); - pos += copied; - if (pos >= outsize) - return outsize; - // append delimiter - output[pos] = delimiter; - ++pos; - // last check - if (pos >= outsize) - return outsize; } - output[--pos] = 0; // The last char would be delimiter, so skip it. - return pos; + nLen += copied + 1; // +1: skip delimiter + } + return nIdx; +} + +// returns number of cells written. +stock xs_implode(output[], outsize, delimiter, const input[][], elemsnum) +{ + new pos = 0; + new copied; + for (new i = 0; i < elemsnum; ++i) + { + copied = copy(output[pos], outsize - pos, input[i]); + pos += copied; + if (pos >= outsize) + return outsize; + // append delimiter + output[pos] = delimiter; + ++pos; + // last check + if (pos >= outsize) + return outsize; } - - XS_LIBVAR_ATTRIB xs__replace_buf[XS_REPLACEBUF_SIZE]; - // Replace all occurencies of what in text with with - // Returns number of (also partially if trimmed by len) replaced items. - XS_LIBFUNC_ATTRIB xs_replace(text[], len, const what[], const with[]) + output[--pos] = 0; // The last char would be delimiter, so skip it. + return pos; +} + + +stock xs__replace_buf[XS_REPLACEBUF_SIZE]; +// Replace all occurencies of what in text with with +// Returns number of (also partially if trimmed by len) replaced items. +stock xs_replace(text[], len, const what[], const with[]) +{ + new occur = 0; + new i = 0; + new bufPos = 0; + new replaceLen = strlen(with); + new whatLen = strlen(what); + for (; text[i]; ++i) { - new occur = 0; - new i = 0; - new bufPos = 0; - new replaceLen = strlen(with); - new whatLen = strlen(what); - for (; text[i]; ++i) + if (text[i] == what[0]) { - if (text[i] == what[0]) + new posInWhat=0; + new j; + for (j = i; j-i < replaceLen && text[j]; ++j, ++posInWhat) { - new posInWhat=0; - new j; - for (j = i; j-i < replaceLen && text[j]; ++j, ++posInWhat) - { - if (text[j] != what[posInWhat]) - break; - } - if (whatLen == posInWhat) - { - for (new i2 = 0; i2 < replaceLen && bufPos < XS_REPLACEBUF_SIZE; ++i2) - xs__replace_buf[bufPos++] = with[i2]; - i = j - 1; - ++occur; - if (bufPos >= XS_REPLACEBUF_SIZE) - return occur; - continue; - } + if (text[j] != what[posInWhat]) + break; + } + if (whatLen == posInWhat) + { + for (new i2 = 0; i2 < replaceLen && bufPos < XS_REPLACEBUF_SIZE; ++i2) + xs__replace_buf[bufPos++] = with[i2]; + i = j - 1; + ++occur; + if (bufPos >= XS_REPLACEBUF_SIZE) + return occur; + continue; } - if (bufPos >= XS_REPLACEBUF_SIZE) - return occur; - xs__replace_buf[bufPos++] = text[i]; } - xs__replace_buf[bufPos] = 0; - copy(text, len, xs__replace_buf); - return occur; - } - - // replaces all occurencies of what in text with with - // Returns number of replaced items. - XS_LIBFUNC_ATTRIB xs_replace_char(text[], len, what, with) - { - // let the xs_replace function do the work - new arr[4]; - arr[0] = what; - arr[1] = 0; - arr[2] = with; - arr[3] = 0; - - return xs_replace(text, len, arr[0], arr[2]); + if (bufPos >= XS_REPLACEBUF_SIZE) + return occur; + xs__replace_buf[bufPos++] = text[i]; } + xs__replace_buf[bufPos] = 0; + copy(text, len, xs__replace_buf); + return occur; +} + +// replaces all occurencies of what in text with with +// Returns number of replaced items. +stock xs_replace_char(text[], len, what, with) +{ + // let the xs_replace function do the work + new arr[4]; + arr[0] = what; + arr[1] = 0; + arr[2] = with; + arr[3] = 0; + return xs_replace(text, len, arr[0], arr[2]); +} + /****** MISC FUNCS *******/ - // sets namestr to name of the command identified by cid - // half-tested - XS_LIBFUNC_ATTRIB xs_concmd_name(cid, namestr[], namelen) - { - new dummy1; - new dummy2[1]; - get_concmd(cid, namestr, namelen, dummy1, dummy2, 0, 0); - } +// sets namestr to name of the command identified by cid +// half-tested +stock xs_concmd_name(cid, namestr[], namelen) +{ + new dummy1; + new dummy2[1]; + get_concmd(cid, namestr, namelen, dummy1, dummy2, 0, 0); +} - // Checks whether there are at least num free visible slots - // half-tested - XS_LIBFUNC_ATTRIB bool:xs_freevisibleslots(num) - { - new maxplayers = get_cvar_num("sv_visiblemaxplayers"); - if (maxplayers <= 0) - maxplayers = MaxClients; - - return (get_playersnum(1) <= maxplayers-num) ? true : false; - } +// Checks whether there are at least num free visible slots +// half-tested +stock bool:xs_freevisibleslots(num) +{ + new maxplayers = get_cvar_num("sv_visiblemaxplayers"); + if (maxplayers <= 0) + maxplayers = MaxClients; - // Returns biggest possible positive number - XS_LIBVAR_ATTRIB xs__maxnum = 0; - // tested - XS_LIBFUNC_ATTRIB xs_get_maxnum() + return (get_playersnum(1) <= maxplayers-num) ? true : false; +} + +// Returns biggest possible positive number +stock xs__maxnum = 0; +// tested +stock xs_get_maxnum() +{ + if (!xs__maxnum) { - if (!xs__maxnum) - { - // build it - xs__maxnum = ((1 << (cellbits - 2)) - 1 ) | (1 << (cellbits - 2)); - /* - new bits = get_cellsize() * 8 - 1; - for (new i = 0; i < bits; ++i) - xs__maxnum |= 1 << i; - */ - } - return xs__maxnum; + // build it + xs__maxnum = ((1 << (cellbits - 2)) - 1 ) | (1 << (cellbits - 2)); + /* + new bits = get_cellsize() * 8 - 1; + for (new i = 0; i < bits; ++i) + xs__maxnum |= 1 << i; + */ } + return xs__maxnum; +} + +// tested +stock xs_get_minnum() +{ + return xs_get_maxnum() + 1; +} + + +// *** The following two functions were created by Damaged Soul. + +// Max messages reserved by engine (DO NOT MODIFY) +#define XS__MAX_ENGINE_MESSAGES 63 +// Max possible messages for mod, is 255 really the limit? +#define XS__MAX_POSSIBLE_MESSAGES 255 + +// Returns max number of messages for mod +stock xs_get_maxmessages() +{ + new name[2]; - // tested - XS_LIBFUNC_ATTRIB xs_get_minnum() - { - return xs_get_maxnum() + 1; - } + for (new i = XS__MAX_ENGINE_MESSAGES + 1; i <= XS__MAX_POSSIBLE_MESSAGES; i++) + if (!get_user_msgname(i, name, 1)) + return i - 1; + + return XS__MAX_POSSIBLE_MESSAGES; +} - - // *** The following two functions were created by Damaged Soul. +// Returns true if msgid is a valid message +stock bool:xs_is_msg_valid(msgid) +{ + new name[2]; + new retval = get_user_msgname(msgid, name, 1); - // Max messages reserved by engine (DO NOT MODIFY) - #define XS__MAX_ENGINE_MESSAGES 63 - // Max possible messages for mod, is 255 really the limit? - #define XS__MAX_POSSIBLE_MESSAGES 255 - - // Returns max number of messages for mod - XS_LIBFUNC_ATTRIB xs_get_maxmessages() - { - new name[2]; - - for (new i = XS__MAX_ENGINE_MESSAGES + 1; i <= XS__MAX_POSSIBLE_MESSAGES; i++) - if (!get_user_msgname(i, name, 1)) - return i - 1; - - return XS__MAX_POSSIBLE_MESSAGES; - } - - // Returns true if msgid is a valid message - XS_LIBFUNC_ATTRIB bool:xs_is_msg_valid(msgid) - { - new name[2]; - new retval = get_user_msgname(msgid, name, 1); - - if (msgid < 1 || (msgid > XS__MAX_ENGINE_MESSAGES && !retval)) - return false; - - return true; - } + if (msgid < 1 || (msgid > XS__MAX_ENGINE_MESSAGES && !retval)) + return false; + + return true; +} /****** MANAGED TASKS ******/ - // ***** managed task ids - XS_LIBFUNC_ATTRIB xs_find_freetaskid() +// ***** managed task ids +stock xs_find_freetaskid() +{ + for (new i = 1; i <= XS_TASK_MANAGEDIDS; ++i) { - for (new i = 1; i <= XS_TASK_MANAGEDIDS; ++i) - { - if (!task_exists(i)) - return i; - } - return -1; + if (!task_exists(i)) + return i; } + return -1; +} + +// ***** managed tasks +enum xs_paramtypes +{ + xs_invalid = 0, + xs_int, + xs_float, + xs_string +} + +// new task +stock xs__TaskParam[ 1 + // number of parameters + XS_TASK_MAXPARAMS + // parameter types + (XS_TASK_MAXPARAMSIZE char) * XS_TASK_MAXPARAMS]; // space for len + value + +stock Float:xs__TaskInterval = 0.0; +stock xs__TaskFlags[5]; +stock xs__TaskFunc[48]; +stock xs__TaskId; +stock xs__TaskRepeat; + +#define xs__TaskParamCount xs__TaskParam[0] +#define xs__TaskParamType[%1] xs__TaskParam[1 + %1] + +#define xs__TaskParamValue[%1] xs__TaskParam[1 + XS_TASK_MAXPARAMS + (%1 * (XS_TASK_MAXPARAMSIZE char))] + + +// incoming task +stock xs__ITaskParam[ 1 + // number of parameters + XS_TASK_MAXPARAMS + // parameter types + (XS_TASK_MAXPARAMSIZE char) * XS_TASK_MAXPARAMS]; // space for len + value +stock xs__ITaskId; + +#define xs__ITaskParamCount xs__ITaskParam[0] +#define xs__ITaskParamType[%1] xs__ITaskParam[1 + %1] + +#define xs__ITaskParamValue[%1] xs__ITaskParam[1 + XS_TASK_MAXPARAMS + (%1 * (XS_TASK_MAXPARAMSIZE char))] + +// tested +stock xs_task_begin(Float:interval, const func[], id = 0, const flags[] = "", repeat = 0) +{ + xs_assert(xs__TaskInterval == 0.0, "New xs_task_begin called before xs_task_end"); - // ***** managed tasks - enum xs_paramtypes - { - xs_invalid = 0, - xs_int, - xs_float, - xs_string - } + xs__TaskInterval = interval; + if (xs__TaskInterval < 0.1) + xs__TaskInterval = 0.1; - // new task - XS_LIBVAR_ATTRIB xs__TaskParam[ 1 + // number of parameters - XS_TASK_MAXPARAMS + // parameter types - (XS_TASK_MAXPARAMSIZE char) * XS_TASK_MAXPARAMS]; // space for len + value + copy(xs__TaskFunc, 47, func); + xs__TaskId = id; + copy(xs__TaskFlags, 4, flags); + xs__TaskRepeat = repeat; - XS_LIBVAR_ATTRIB Float:xs__TaskInterval = 0.0; - XS_LIBVAR_ATTRIB xs__TaskFlags[5]; - XS_LIBVAR_ATTRIB xs__TaskFunc[48]; - XS_LIBVAR_ATTRIB xs__TaskId; - XS_LIBVAR_ATTRIB xs__TaskRepeat; - - #define xs__TaskParamCount xs__TaskParam[0] - #define xs__TaskParamType[%1] xs__TaskParam[1 + %1] - - #define xs__TaskParamValue[%1] xs__TaskParam[1 + XS_TASK_MAXPARAMS + (%1 * (XS_TASK_MAXPARAMSIZE char))] - - - // incoming task - XS_LIBVAR_ATTRIB xs__ITaskParam[ 1 + // number of parameters - XS_TASK_MAXPARAMS + // parameter types - (XS_TASK_MAXPARAMSIZE char) * XS_TASK_MAXPARAMS]; // space for len + value - XS_LIBVAR_ATTRIB xs__ITaskId; - - #define xs__ITaskParamCount xs__ITaskParam[0] - #define xs__ITaskParamType[%1] xs__ITaskParam[1 + %1] - - #define xs__ITaskParamValue[%1] xs__ITaskParam[1 + XS_TASK_MAXPARAMS + (%1 * (XS_TASK_MAXPARAMSIZE char))] - - // tested - XS_LIBFUNC_ATTRIB xs_task_begin(Float:interval, const func[], id = 0, const flags[] = "", repeat = 0) - { - xs_assert(xs__TaskInterval == 0.0, "New xs_task_begin called before xs_task_end"); + xs__TaskParamCount = 0; +} + +// tested +stock xs_task_pushint(value, bool:__isfl=false /*internal use only*/) +{ + xs_assert(xs__TaskInterval, "xs_task_push* called without xs_task_begin"); + if (xs__TaskParamCount >= XS_TASK_MAXPARAMS) + return 0; - xs__TaskInterval = interval; - if (xs__TaskInterval < 0.1) - xs__TaskInterval = 0.1; - - copy(xs__TaskFunc, 47, func); - xs__TaskId = id; - copy(xs__TaskFlags, 4, flags); - xs__TaskRepeat = repeat; - - xs__TaskParamCount = 0; - } + xs__TaskParamType[xs__TaskParamCount] = __isfl ? xs_float : xs_int; + xs__TaskParamValue[xs__TaskParamCount] = value; - // tested - XS_LIBFUNC_ATTRIB xs_task_pushint(value, bool:__isfl=false /*internal use only*/) - { - xs_assert(xs__TaskInterval, "xs_task_push* called without xs_task_begin"); - if (xs__TaskParamCount >= XS_TASK_MAXPARAMS) - return 0; - - xs__TaskParamType[xs__TaskParamCount] = __isfl ? xs_float : xs_int; - xs__TaskParamValue[xs__TaskParamCount] = value; + ++xs__TaskParamCount; + return 1; +} + +// tested +stock xs_task_pushfl(Float:value) +{ + return xs_task_pushint(_:value, true); +} + +// tested +stock xs_task_pushstr(const value[]) +{ + xs_assert(xs__TaskInterval, "xs_task_push* called without xs_task_begin"); + if (xs__TaskParamCount >= XS_TASK_MAXPARAMS) + return 0; - ++xs__TaskParamCount; - return 1; - } + xs__TaskParamType[xs__TaskParamCount] = xs_string; + strpack(xs__TaskParamValue[xs__TaskParamCount], value); + ++xs__TaskParamCount; + return 1; +} + +// tested +stock xs_task_end() +{ + xs_assert(xs__TaskInterval, "xs_task_end called without xs_task_begin"); - // tested - XS_LIBFUNC_ATTRIB xs_task_pushfl(Float:value) + // find a task id if needed + if (xs__TaskId == -1) { - return xs_task_pushint(_:value, true); - } - - // tested - XS_LIBFUNC_ATTRIB xs_task_pushstr(const value[]) - { - xs_assert(xs__TaskInterval, "xs_task_push* called without xs_task_begin"); - if (xs__TaskParamCount >= XS_TASK_MAXPARAMS) - return 0; - - xs__TaskParamType[xs__TaskParamCount] = xs_string; - strpack(xs__TaskParamValue[xs__TaskParamCount], value); - ++xs__TaskParamCount; - return 1; - } - - // tested - XS_LIBFUNC_ATTRIB xs_task_end() - { - xs_assert(xs__TaskInterval, "xs_task_end called without xs_task_begin"); - - // find a task id if needed + xs__TaskId = xs_find_freetaskid(); if (xs__TaskId == -1) { - xs__TaskId = xs_find_freetaskid(); - if (xs__TaskId == -1) - { - // not found - xs__TaskInterval = 0.0; - return -1; - } + // not found + xs__TaskInterval = 0.0; + return -1; } - - set_task(xs__TaskInterval, xs__TaskFunc, xs__TaskId, xs__TaskParam, - 1 + xs__TaskParamCount * (XS_TASK_MAXPARAMSIZE char), xs__TaskFlags, xs__TaskRepeat); - - xs__TaskInterval = 0.0; - - return xs__TaskId; } + set_task(xs__TaskInterval, xs__TaskFunc, xs__TaskId, xs__TaskParam, + 1 + xs__TaskParamCount * (XS_TASK_MAXPARAMSIZE char), xs__TaskFlags, xs__TaskRepeat); - // tested - #define XS_MAKE_TASKFUNC(%1) public %1(const _xs__taskparam[], _xs__taskid) if(xs__task_setup(_xs__taskparam, _xs__taskid)) + xs__TaskInterval = 0.0; - // tested - XS_LIBFUNC_ATTRIB xs__task_setup(const param[], taskid) - { - xs__ITaskId = taskid; - new len = 1 + param[0] * (XS_TASK_MAXPARAMSIZE char); - for (new i = 0; i < len; ++i) - xs__ITaskParam[i] = param[i]; - return 1; - } + return xs__TaskId; +} + + +// tested +#define XS_MAKE_TASKFUNC(%1) public %1(const _xs__taskparam[], _xs__taskid) if(xs__task_setup(_xs__taskparam, _xs__taskid)) + +// tested +stock xs__task_setup(const param[], taskid) +{ + xs__ITaskId = taskid; + new len = 1 + param[0] * (XS_TASK_MAXPARAMSIZE char); + for (new i = 0; i < len; ++i) + xs__ITaskParam[i] = param[i]; + return 1; +} + +// tested +stock xs_task_readid() +{ + return xs__ITaskId; +} + +// tested +stock xs_task_paramcount() +{ + return xs__ITaskParamCount; +} + +// tested +stock xs_paramtypes:xs_task_paramtype(paramid) +{ + if (paramid < 0 || paramid >= xs__ITaskParamCount) + return xs_invalid; - // tested - XS_LIBFUNC_ATTRIB xs_task_readid() - { - return xs__ITaskId; - } + return xs_paramtypes:xs__ITaskParamType[paramid]; +} + +// tested +stock xs_task_paramint(paramid) +{ + if (paramid < 0 || paramid >= xs__ITaskParamCount) + return 0; + if (xs__ITaskParamType[paramid] != _:xs_int) + return 0; - // tested - XS_LIBFUNC_ATTRIB xs_task_paramcount() - { - return xs__ITaskParamCount; - } + return xs__ITaskParamValue[paramid]; +} + +// tested +stock Float:xs_task_paramfl(paramid) +{ + if (paramid < 0 || paramid >= xs__ITaskParamCount) + return 0.0; + if (xs__ITaskParamType[paramid] != _:xs_float) + return 0.0; - // tested - XS_LIBFUNC_ATTRIB xs_paramtypes:xs_task_paramtype(paramid) - { - if (paramid < 0 || paramid >= xs__ITaskParamCount) - return xs_invalid; - - return xs_paramtypes:xs__ITaskParamType[paramid]; - } + return Float:xs__ITaskParamValue[paramid]; +} + +// tested +stock xs_task_paramstr(paramid, out[], maxlen) +{ + #pragma unused maxlen - // tested - XS_LIBFUNC_ATTRIB xs_task_paramint(paramid) - { - if (paramid < 0 || paramid >= xs__ITaskParamCount) - return 0; - if (xs__ITaskParamType[paramid] != _:xs_int) - return 0; - - return xs__ITaskParamValue[paramid]; - } - - // tested - XS_LIBFUNC_ATTRIB Float:xs_task_paramfl(paramid) - { - if (paramid < 0 || paramid >= xs__ITaskParamCount) - return 0.0; - if (xs__ITaskParamType[paramid] != _:xs_float) - return 0.0; - - return Float:xs__ITaskParamValue[paramid]; - } - - // tested - XS_LIBFUNC_ATTRIB xs_task_paramstr(paramid, out[], maxlen) - { - #pragma unused maxlen - - if (paramid < 0 || paramid >= xs__ITaskParamCount) - return 0; - if (xs__ITaskParamType[paramid] != _:xs_string) - return 0; - - strunpack(out, xs__ITaskParamValue[paramid]); - return 1; - } + if (paramid < 0 || paramid >= xs__ITaskParamCount) + return 0; + if (xs__ITaskParamType[paramid] != _:xs_string) + return 0; + strunpack(out, xs__ITaskParamValue[paramid]); + return 1; +} diff --git a/plugins/mapchooser.sma b/plugins/mapchooser.sma index 4d3116d2..9706f30a 100755 --- a/plugins/mapchooser.sma +++ b/plugins/mapchooser.sma @@ -1,36 +1,15 @@ -/* AMX Mod X -* Nextmap Chooser Plugin -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Nextmap Chooser Plugin +// #include #include diff --git a/plugins/mapsmenu.sma b/plugins/mapsmenu.sma index b07ad7bc..ac7a6f74 100755 --- a/plugins/mapsmenu.sma +++ b/plugins/mapsmenu.sma @@ -1,36 +1,15 @@ -/* AMX Mod X -* Maps Menu Plugin -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Maps Menu Plugin +// #include #include @@ -321,7 +300,7 @@ public cmdMapsMenu(id, level, cid) } public delayedChange(mapname[]) - server_cmd("changelevel %s", mapname) + change_level(mapname) public actionVoteMapMenu(id, key) { diff --git a/plugins/menufront.sma b/plugins/menufront.sma index 1a4eb3bc..4ef6fdab 100755 --- a/plugins/menufront.sma +++ b/plugins/menufront.sma @@ -1,36 +1,15 @@ -/* AMX Mod X -* Menus Front-End Plugin -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Menus Front-End Plugin +// #include #include diff --git a/plugins/multilingual.sma b/plugins/multilingual.sma index fe283334..6bfb764d 100755 --- a/plugins/multilingual.sma +++ b/plugins/multilingual.sma @@ -1,35 +1,15 @@ -/* AMX Mod X script. -* Multilingual System Plugin -* -* by the AMX Mod X Development Team -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Multilingual System Plugin +// #include #include diff --git a/plugins/nextmap.sma b/plugins/nextmap.sma index 4af491fa..ff73fe58 100755 --- a/plugins/nextmap.sma +++ b/plugins/nextmap.sma @@ -1,36 +1,15 @@ -/* AMX Mod X -* NextMap Plugin -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// NextMap Plugin +// #include @@ -118,7 +97,7 @@ public delayedChange(param[]) if (g_mp_chattime) { set_pcvar_float(g_mp_chattime, get_pcvar_float(g_mp_chattime) - 2.0) } - server_cmd("changelevel %s", param) + change_level(param) } public changeMap() diff --git a/plugins/ns/idlekicker.sma b/plugins/ns/idlekicker.sma index f7f6a72f..ba67efb4 100755 --- a/plugins/ns/idlekicker.sma +++ b/plugins/ns/idlekicker.sma @@ -1,35 +1,15 @@ -/* AMX Mod X -* Idle Player Remover -* -* by the AMX Mod X Development Team -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Idle Player Remover Plugin +// #include #include diff --git a/plugins/ns/mapchooser.sma b/plugins/ns/mapchooser.sma index f1ea9d22..ae0e4767 100755 --- a/plugins/ns/mapchooser.sma +++ b/plugins/ns/mapchooser.sma @@ -1,36 +1,15 @@ -/* AMX Mod X -* Nextmap Chooser Plugin -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Nextmap Chooser Plugin +// #include #include diff --git a/plugins/ns/nextmap.sma b/plugins/ns/nextmap.sma index 3b2e80ed..4bbb810b 100755 --- a/plugins/ns/nextmap.sma +++ b/plugins/ns/nextmap.sma @@ -1,36 +1,15 @@ -/* AMX Mod X -* Natural-Selection NextMap Plugin -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection NextMap Plugin +// enum mapdata { NAME[32], diff --git a/plugins/ns/nscommands.sma b/plugins/ns/nscommands.sma index e79a9ae3..26367967 100755 --- a/plugins/ns/nscommands.sma +++ b/plugins/ns/nscommands.sma @@ -1,35 +1,15 @@ -/* AMX Mod X -* Natural-Selection Admin Commands Plugin -* -* by the AMX Mod X Development Team -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Natural Selection Admin Commands Plugin +// #include #include diff --git a/plugins/ns/plmenu.sma b/plugins/ns/plmenu.sma index 1dab911c..6663ad80 100644 --- a/plugins/ns/plmenu.sma +++ b/plugins/ns/plmenu.sma @@ -1,36 +1,15 @@ -/* AMX Mod X -* Players Menu Plugin -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Players Menu Plugin +// #include #include diff --git a/plugins/ns/timeleft.sma b/plugins/ns/timeleft.sma index 0aa59e66..e5196ce4 100755 --- a/plugins/ns/timeleft.sma +++ b/plugins/ns/timeleft.sma @@ -1,36 +1,15 @@ -/* AMX Mod X -* TimeLeft Plugin -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TimeLeft Plugin +// #include @@ -248,4 +227,4 @@ public roundChange() { getCombatTimeLeft() { new combatTime = floatround( (get_cvar_float("mp_combattime") * 60) - (get_gametime() - g_roundStartTime) ) return (combatTime < 0) ? 0 : combatTime -} \ No newline at end of file +} diff --git a/plugins/ns/unstuck.sma b/plugins/ns/unstuck.sma index c97fc038..d5121885 100755 --- a/plugins/ns/unstuck.sma +++ b/plugins/ns/unstuck.sma @@ -1,35 +1,15 @@ -/* AMX Mod X -* UnStuck Plugin -* -* by the AMX Mod X Development Team -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// UnStuck Plugin +// #include #include @@ -89,4 +69,4 @@ public unStuck(id) } } return PLUGIN_CONTINUE; -} \ No newline at end of file +} diff --git a/plugins/pausecfg.sma b/plugins/pausecfg.sma index 88a25aab..43897a8b 100755 --- a/plugins/pausecfg.sma +++ b/plugins/pausecfg.sma @@ -1,36 +1,15 @@ -/* AMX Mod X -* Pause Plugins Plugin -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Pause Plugins Plugin +// #include #include diff --git a/plugins/plmenu.sma b/plugins/plmenu.sma index af3ec272..1f19d240 100755 --- a/plugins/plmenu.sma +++ b/plugins/plmenu.sma @@ -1,36 +1,15 @@ -/* AMX Mod X -* Players Menu Plugin -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Players Menu Plugin +// #include #include diff --git a/plugins/pluginmenu.sma b/plugins/pluginmenu.sma index 8ae46965..8913a23c 100644 --- a/plugins/pluginmenu.sma +++ b/plugins/pluginmenu.sma @@ -1,35 +1,15 @@ -/* AMX Mod X -* Plugin Cvar and Command Menu -* -* by the AMX Mod X Development Team -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Plugin Cvar and Command Menu +// #include #include @@ -958,4 +938,4 @@ public CommandMenuCommand(id, level, cid) DisplayPluginMenuDefault(id) { DisplayPluginMenu(id,"Plugin Command Menu:", "PluginMenuSelection","DisplayCmdMenu","GetNumberOfCmdsForPlid"); -} \ No newline at end of file +} diff --git a/plugins/scrollmsg.sma b/plugins/scrollmsg.sma index 0af6fe52..316c8238 100755 --- a/plugins/scrollmsg.sma +++ b/plugins/scrollmsg.sma @@ -1,36 +1,15 @@ -/* AMX Mod X -* Scrolling Message Plugin -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Scrolling Message Plugin +// #include #include diff --git a/plugins/statscfg.sma b/plugins/statscfg.sma index c92d15ca..fc4a663a 100755 --- a/plugins/statscfg.sma +++ b/plugins/statscfg.sma @@ -1,36 +1,15 @@ -/* AMX Mod X -* Stats Configuration Plugin -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Stats Configuration Plugin +// #include #include diff --git a/plugins/telemenu.sma b/plugins/telemenu.sma index 7207cc01..c3314e86 100755 --- a/plugins/telemenu.sma +++ b/plugins/telemenu.sma @@ -1,36 +1,15 @@ -/* AMX Mod X -* Teleport Menu Plugin -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Teleport Menu Plugin +// #include #include diff --git a/plugins/testsuite/admins_test.sma b/plugins/testsuite/admins_test.sma index f3edd7aa..e7853a2f 100644 --- a/plugins/testsuite/admins_test.sma +++ b/plugins/testsuite/admins_test.sma @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include new __testnumber; @@ -120,4 +129,4 @@ public testadmins() test(admins_num(),0); server_print("test complete, %d errors",errcount); -} \ No newline at end of file +} diff --git a/plugins/testsuite/arraytest.sma b/plugins/testsuite/arraytest.sma index 87f28708..ccf346c6 100644 --- a/plugins/testsuite/arraytest.sma +++ b/plugins/testsuite/arraytest.sma @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include new __testnumber; diff --git a/plugins/testsuite/callfunc_test.sma b/plugins/testsuite/callfunc_test.sma index f19ecd3e..77d22002 100644 --- a/plugins/testsuite/callfunc_test.sma +++ b/plugins/testsuite/callfunc_test.sma @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include public plugin_init() diff --git a/plugins/testsuite/datapack_test.sma b/plugins/testsuite/datapack_test.sma index 1e17bc48..bba11d63 100644 --- a/plugins/testsuite/datapack_test.sma +++ b/plugins/testsuite/datapack_test.sma @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include new failcount; diff --git a/plugins/testsuite/fakemeta_tests.sma b/plugins/testsuite/fakemeta_tests.sma index c7843a8c..64e2759c 100644 --- a/plugins/testsuite/fakemeta_tests.sma +++ b/plugins/testsuite/fakemeta_tests.sma @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include #include diff --git a/plugins/testsuite/fmttest.sma b/plugins/testsuite/fmttest.sma index 28d98935..4f921551 100644 --- a/plugins/testsuite/fmttest.sma +++ b/plugins/testsuite/fmttest.sma @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include public plugin_init() diff --git a/plugins/testsuite/fwdtest1.sma b/plugins/testsuite/fwdtest1.sma index 636f8968..29f390c0 100644 --- a/plugins/testsuite/fwdtest1.sma +++ b/plugins/testsuite/fwdtest1.sma @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include new g_forward diff --git a/plugins/testsuite/fwdtest2.sma b/plugins/testsuite/fwdtest2.sma index 5c01d843..a75fd8a2 100644 --- a/plugins/testsuite/fwdtest2.sma +++ b/plugins/testsuite/fwdtest2.sma @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include new g_id diff --git a/plugins/testsuite/logtest.sma b/plugins/testsuite/logtest.sma index 7767cea0..8c0d3ad2 100644 --- a/plugins/testsuite/logtest.sma +++ b/plugins/testsuite/logtest.sma @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include new g_BlockLog diff --git a/plugins/testsuite/menutest.sma b/plugins/testsuite/menutest.sma index 97c292af..c7ce1bb7 100644 --- a/plugins/testsuite/menutest.sma +++ b/plugins/testsuite/menutest.sma @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include public plugin_init() diff --git a/plugins/testsuite/native_test.sma b/plugins/testsuite/native_test.sma index 5b014d22..dd35909c 100644 --- a/plugins/testsuite/native_test.sma +++ b/plugins/testsuite/native_test.sma @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include native Factorial(num) diff --git a/plugins/testsuite/nvault_test.sma b/plugins/testsuite/nvault_test.sma index 0a1dda71..11d4c8ca 100644 --- a/plugins/testsuite/nvault_test.sma +++ b/plugins/testsuite/nvault_test.sma @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include #include diff --git a/plugins/testsuite/regex_test.sma b/plugins/testsuite/regex_test.sma index 7e5e4df1..622a8674 100644 --- a/plugins/testsuite/regex_test.sma +++ b/plugins/testsuite/regex_test.sma @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include #include @@ -448,4 +457,4 @@ public OnServerCommand() } end(); -} \ No newline at end of file +} diff --git a/plugins/testsuite/sorttest.sma b/plugins/testsuite/sorttest.sma index 8ac53a43..2441cc55 100644 --- a/plugins/testsuite/sorttest.sma +++ b/plugins/testsuite/sorttest.sma @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include public plugin_init() diff --git a/plugins/testsuite/sqlxtest.sma b/plugins/testsuite/sqlxtest.sma index f0367a7e..40846022 100644 --- a/plugins/testsuite/sqlxtest.sma +++ b/plugins/testsuite/sqlxtest.sma @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include #include #include diff --git a/plugins/testsuite/stacktest.sma b/plugins/testsuite/stacktest.sma index aa8be50a..c8ebb42d 100644 --- a/plugins/testsuite/stacktest.sma +++ b/plugins/testsuite/stacktest.sma @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include new FailCount; diff --git a/plugins/testsuite/strbreak.sma b/plugins/testsuite/strbreak.sma index 98724093..1aaf3747 100644 --- a/plugins/testsuite/strbreak.sma +++ b/plugins/testsuite/strbreak.sma @@ -1,4 +1,12 @@ -// vim: set ts=4 sw=4 tw=99 sts=4 noet ft=c: +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include #include diff --git a/plugins/testsuite/textparse_test.cfg b/plugins/testsuite/textparse_test.cfg new file mode 100644 index 00000000..5bf0cea0 --- /dev/null +++ b/plugins/testsuite/textparse_test.cfg @@ -0,0 +1,135 @@ +/** + * This file is used to set various options that are important to SourceMod's core. + * If this file is missing or an option in this file is missing, then the default values will be used. + */ +"Core" +{ + /** + * This option determines if SourceMod logging is enabled. + * + * "on" - Logging is enabled (default) + * "off" - Logging is disabled + */ + "Logging" "on" + + /** + * This option determines how SourceMod logging should be handled. + * + * "daily" - New log file is created for each day (default) + * "map" - New log file is created for each map change + * "game" - Use game's log files + */ + "LogMode" "daily" + + /** + * Language that multilingual enabled plugins and extensions will use to print messages. + * Only languages listed in languages.cfg are valid. + * + * The default value is "en" + */ + "ServerLang" "en" + + /** + * String to use as the public chat trigger. Set an empty string to disable. + */ + "PublicChatTrigger" "!" + + /** + * String to use as the silent chat trigger. Set an empty string to disable. + */ + "SilentChatTrigger" "/" + + /** + * If a say command is a silent chat trigger, and is used by an admin, + * but it does not evaluate to an actual command, it will be displayed + * publicly. This setting allows you to suppress accidental typings. + * + * The default value is "no". A value of "yes" will supress. + */ + "SilentFailSuppress" "no" + + /** + * Password setinfo key that clients must set. You must change this in order for + * passwords to work, for security reasons. + */ + "PassInfoVar" "_password" + + /** + * Specifies the sound that gets played when an item is selected from a menu. + */ + "MenuItemSound" "buttons/button14.wav" + + /** + * Specifies the sound that gets played when an "Exit" button is selected + * from a menu. + */ + "MenuExitSound" "buttons/combine_button7.wav" + + /** + * Specifies the sound that gets played when an "Exit Back" button is selected + * from a menu. This is the special "Back" button that is intended to roll back + * to a previous menu. + */ + "MenuExitBackSound" "buttons/combine_button7.wav" + + /** + * Enables or disables whether SourceMod reads a client's cl_language cvar to set + * their language for server-side phrase translation. + * + * "on" - Translate using the client's language (default) + * "off" - Translate using default server's language + */ + "AllowClLanguageVar" "On" + + /** + * Enables or Disables SourceMod's automatic gamedata updating. + * + * The default value is "no". A value of "yes" will block the Auto Updater. + */ + "DisableAutoUpdate" "no" + + /** + * If set to yes, a successful gamedata update will attempt to restart SourceMod. + * SourceMod is unloaded and reloaded, and the map is changed to the current map. + * Since gamedata updates occur when the server loads, impact should be minimal. + * But to be safe, this option is disabled by default. + */ + "ForceRestartAfterUpdate" "no" + + /** + * URL to use for retrieving update information. + * SSL is not yet supported. + */ + "AutoUpdateURL" "http://update.sourcemod.net/update/" + + /** + * Whether to show debug spew. + * Currently this will log details about the gamedata updating process. + */ + "DebugSpew" "no" + + /** + * If set to yes, SourceMod will validate steamid auth strings with the Steam backend before giving out admin access. + * This can prevent malicious users from impersonating admins with stolen Steam apptickets. + * If Steam is down, admins will not be authenticated until Steam comes back up. + * This option increases the security of your server, but is still experimental. + */ + "SteamAuthstringValidation" "yes" + + /** + * Enables or disables whether SourceMod blocks known or potentially malicious plugins from loading. + * It is STRONGLY advised that this is left enabled, there have been cases in the past with plugins that + * allow anyone to delete files on the server, gain full rcon control, etc. + * + * "yes" - Block malware or illegal plugins from loading (default) + * "no" - Warn about malware or illegal plugins loading + */ + "BlockBadPlugins" "yes" + + /** + * If a plugin takes too long to execute, hanging or freezing the game server in the process, + * SourceMod will attempt to terminate that plugin after the specified timeout length has + * passed. You can disable this feature by setting the value to "0". + */ + "SlowScriptTimeout" "8" +} \ No newline at end of file diff --git a/plugins/testsuite/textparse_test.ini b/plugins/testsuite/textparse_test.ini new file mode 100644 index 00000000..88078331 --- /dev/null +++ b/plugins/testsuite/textparse_test.ini @@ -0,0 +1,68 @@ +;CSDM Configuration File +; Default settings by BAILOPAN + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;You must be running the Main plugin for this section +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +[settings] + +;Sets whether CSDM is enabled or not. +enabled = 1 + +;Sets whether or not players should be stripped of weapons on round start +; (excludes knife) +strip_weapons = 1 + +;Sets how long weapons should stay on the ground for after being dropped +;in seconds. note that enabling this can create lots of lag for clients +; AND server. 0 is immediate, -1 is infinite. +weapons_stay = 0 + +;Sets the spawn mode. +; "none" - users spawn at normal map spawn points +; "preset" - csdm_spawn_preset.amxx required, uses predefined spawns in config files +; -- others may be supplied by 3rd party plugins +spawnmode = preset + +;Sets whether the bomb is removed +remove_bomb = 1 + +;Sets the spawn waiting time +spawn_wait_time = 0.75 + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;You must be running the protection plugin for this section +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +[protection] ; some comment + +;Is spawn protection enabled? +enabled = 1 + +;Colors of glow shell, leave this in quotes +;The digits are R, G, B, A where A is the alpha transparency +; (as A gets higher, the glow shell is thicker) +colors = "0 255 0 200" + +;Number of seconds someone is respawned for. +time = 2 + +;;;;;;;;;;;;;;;; +;;WEAPON MENUS;; +;;;;;;;;;;;;;;;; + +;Format for weapon menus is: +;shortname "Display Name" menupage +;Change the '1' to a '0' to block the weapon +;Removing or moving things +; from the list will change the order of the menus! + +[secondary] gabe // < just to test param. +usp USP 1 +glock18 Glock 1 +deagle Deagle 1 + +;List weapons here the bots can randomly have +;The short name must match one in the list above +[botsecondary +deagle +usp diff --git a/plugins/testsuite/textparse_test.sma b/plugins/testsuite/textparse_test.sma new file mode 100644 index 00000000..64e6ce82 --- /dev/null +++ b/plugins/testsuite/textparse_test.sma @@ -0,0 +1,253 @@ +/** + * vim: set ts=4 sw=4 tw=99 noet: + * + * AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). + * Copyright (C) The AMX Mod X Development Team. + * + * This software is licensed under the GNU General Public License, version 3 or higher. + * Additional exceptions apply. For full license details, see LICENSE.txt or visit: + * https://alliedmods.net/amxmodx-license + */ + +#include + +new SuccessCount; +new Trie:ExpectedKVData; +new bool:Debug; + +public plugin_init() +{ + register_concmd("textparse", "ConsoleCommand_TextParse"); + + Debug = !!(plugin_flags() & AMX_FLAG_DEBUG); +} + +public ConsoleCommand_TextParse() +{ + InitializeTextParseSMC(); + InitializeTextParseINI(); +} + +/** + * SMC Config format + */ + +InitializeTextParseSMC() +{ + SuccessCount = 0; + + server_print("Testing text parser with SMC config file format..."); + + new const configFile[] = "addons/amxmodx/scripting/testsuite/textparse_test.cfg"; + + ExpectedKVData = TrieCreate(); + TrieSetString(ExpectedKVData, "Logging", "on"); + TrieSetString(ExpectedKVData, "LogMode", "daily"); + TrieSetString(ExpectedKVData, "ServerLang", "en"); + TrieSetString(ExpectedKVData, "PublicChatTrigger", "!"); + TrieSetString(ExpectedKVData, "SilentChatTrigger", "/"); + TrieSetString(ExpectedKVData, "SilentFailSuppress", "no"); + TrieSetString(ExpectedKVData, "PassInfoVar", "_password"); + TrieSetString(ExpectedKVData, "MenuItemSound", "buttons/button14.wav"); + TrieSetString(ExpectedKVData, "MenuExitSound", "buttons/combine_button7.wav"); + TrieSetString(ExpectedKVData, "MenuExitBackSound", "buttons/combine_button7.wav"); + TrieSetString(ExpectedKVData, "AllowClLanguageVar", "On"); + TrieSetString(ExpectedKVData, "DisableAutoUpdate", "no"); + TrieSetString(ExpectedKVData, "ForceRestartAfterUpdate", "no"); + TrieSetString(ExpectedKVData, "AutoUpdateURL", "http://update.sourcemod.net/update/"); + TrieSetString(ExpectedKVData, "DebugSpew", "no"); + TrieSetString(ExpectedKVData, "SteamAuthstringValidation", "yes"); + TrieSetString(ExpectedKVData, "BlockBadPlugins", "yes"); + TrieSetString(ExpectedKVData, "SlowScriptTimeout", "8"); + + new const expectedSectionCount = 2; // Include start and end. + new const expectedStartEndCount = 2; + new const expectedKeyValueCount = TrieGetSize(ExpectedKVData); + new const expectedLineCount = file_size(configFile, .flag = 1) - 1; + + new SMCParser:parser = SMC_CreateParser(); + + SMC_SetReaders(parser, "ReadCore_KeyValue", "ReadCore_NewSection", "ReadCore_EndSection"); + SMC_SetParseStart(parser, "ReadCore_ParseStart"); + SMC_SetRawLine(parser, "ReadCore_CurrentLine"); + SMC_SetParseEnd(parser, "ReadCore_ParseEnd"); + + new line, col; + new SMCError:err = SMC_ParseFile(parser, configFile, line, col); + + if (err != SMCError_Okay) + { + new buffer[64]; + server_print("%s", SMC_GetErrorString(err, buffer, charsmax(buffer)) ? buffer : "Fatal parse error"); + } + + if (line == expectedLineCount + 1 && col == 2) + { + ++SuccessCount; + } + + server_print("^tTests successful: %d/%d", SuccessCount, expectedStartEndCount + expectedSectionCount + expectedKeyValueCount + expectedLineCount + 1); + + SMC_DestroyParser(parser); + TrieDestroy(ExpectedKVData); + SuccessCount = 0; +} + +public ReadCore_ParseStart(SMCParser:handle) +{ + Debug && server_print("ReadCore_ParseStart"); + ++SuccessCount; +} + +public ReadCore_NewSection(SMCParser:handle, const name[]) +{ + Debug && server_print("^tReadCore_NewSection - %s", name); + ++SuccessCount; +} + +public ReadCore_KeyValue(SMCParser:handle, const key[], const value[]) +{ + Debug && server_print("^t^tReadCore_KeyValue - %-32s %s", key, value); + + new buffer[128]; + if (TrieGetString(ExpectedKVData, key, buffer, charsmax(buffer)) && equal(value, buffer)) + { + ++SuccessCount; + } +} + +public ReadCore_EndSection(SMCParser:handle) +{ + Debug && server_print("^tReadCore_EndSection"); + ++SuccessCount; +} + +public ReadCore_CurrentLine(SMCParser:handle, const line[], lineno) +{ + //Debug && server_print("^t^tReadCore_CurrentLine - %s", line); + ++SuccessCount; +} + +public ReadCore_ParseEnd(SMCParser:handle, bool:halted, bool:failed) +{ + Debug &&server_print("ReadCore_ParseEnd - halted: %s, failed: %s", halted ? "yes" : "no", failed ? "yes" : "no"); + ++SuccessCount; +} + + +/** + * INI Config format + */ + +public InitializeTextParseINI() +{ + SuccessCount = 0; + + server_print("Testing text parser with INI config file format..."); + + new const configFile[] = "addons/amxmodx/scripting/testsuite/textparse_test.ini"; + + ExpectedKVData = TrieCreate(); + TrieSetString(ExpectedKVData, "settings", ""); + TrieSetString(ExpectedKVData, "enabled", "1"); + TrieSetString(ExpectedKVData, "strip_weapons", "1"); + TrieSetString(ExpectedKVData, "weapons_stay", "0"); + TrieSetString(ExpectedKVData, "spawnmode", "preset"); + TrieSetString(ExpectedKVData, "remove_bomb", "1"); + TrieSetString(ExpectedKVData, "spawn_wait_time", "0.75"); + TrieSetString(ExpectedKVData, "protection", ""); + TrieSetString(ExpectedKVData, "colors", "0 255 0 200"); + TrieSetString(ExpectedKVData, "time", "time"); + TrieSetString(ExpectedKVData, "secondary", ""); + TrieSetString(ExpectedKVData, "usp USP 1", ""); + TrieSetString(ExpectedKVData, "glock18 Glock 1", ""); + TrieSetString(ExpectedKVData, "deagle Deagle 1", ""); + TrieSetString(ExpectedKVData, "botsecondary", ""); + TrieSetString(ExpectedKVData, "deagle", ""); + TrieSetString(ExpectedKVData, "usp", ""); + + new const expectedSectionCount = 4; + new const expectedStartEndCount = 2; + new const expectedKeyValueCount = TrieGetSize(ExpectedKVData) - expectedSectionCount; + new const expectedLineCount = TrieGetSize(ExpectedKVData); // This doesn't include blanck/comments line. + + new INIParser:parser = INI_CreateParser(); + + INI_SetReaders(parser, "ReadCSDM_KeyValue", "ReadCSDM_NewSection"); + INI_SetParseStart(parser, "ReadCSDM_ParseStart"); + INI_SetRawLine(parser, "ReadCSDM_CurrentLine"); + INI_SetParseEnd(parser, "ReadCSDM_ParseEnd"); + + new line, col; + new bool:result = INI_ParseFile(parser, configFile, line, col); + + if (!result) + { + server_print("^tFatal parse error"); + } + + if (line == expectedLineCount + 1) + { + ++SuccessCount; + } + + server_print("^tTests successful: %d/%d", SuccessCount, expectedStartEndCount + expectedSectionCount + expectedKeyValueCount + expectedLineCount + 1); + + INI_DestroyParser(parser); + TrieDestroy(ExpectedKVData); +} + +public ReadCSDM_ParseStart(INIParser:handle) +{ + Debug && server_print("ReadCSDM_ParseStart"); + ++SuccessCount; +} + +public ReadCSDM_NewSection(INIParser:handle, const section[], bool:invalid_tokens, bool:close_bracket, bool:extra_tokens, curtok) +{ + Debug && server_print("^tReadCSDM_NewSection - [%s] (invalid_tokens: '%s', close_bracked: '%s', extra_tokens: '%s')", section, invalid_tokens ? "yes" : "no", close_bracket ? "yes" : "no", extra_tokens ? "yes" : "no"); + + if (TrieKeyExists(ExpectedKVData, section)) + { + if ((equal(section, "secondary") && !extra_tokens) || + (equal(section, "botsecondary") && close_bracket)) + { + return true; + } + + ++SuccessCount; + } + + return true; +} + +public bool:ReadCSDM_KeyValue(INIParser:handle, const key[], const value[], bool:invalid_tokens, bool:equal_token, bool:quotes, curtok) +{ + Debug && server_print("^t^tReadCSDM_KeyValue - %-32s %s", key, value); + + new buffer[128]; + if (TrieGetString(ExpectedKVData, key, buffer, charsmax(buffer)) && equal(value, buffer)) + { + if (equal(key, "colors") && !quotes) + { + return true; + } + + ++SuccessCount; + } + + return true; +} + +public bool:ReadCSDM_CurrentLine(INIParser:handle, const line[], curtok) +{ + //Debug && server_print("^t^tReadCSDM_CurrentLine - %s", line); + ++SuccessCount; + return true; +} + +public ReadCSDM_ParseEnd(INIParser:handle, bool:halted, bool:failed) +{ + Debug && server_print("ReadCSDM_ParseStart"); + ++SuccessCount; +} \ No newline at end of file diff --git a/plugins/testsuite/trietest.sma b/plugins/testsuite/trietest.sma index 6a43abaa..06319b0d 100644 --- a/plugins/testsuite/trietest.sma +++ b/plugins/testsuite/trietest.sma @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include new failcount = 0; diff --git a/plugins/testsuite/utf8test.sma b/plugins/testsuite/utf8test.sma index 38125936..4be47734 100644 --- a/plugins/testsuite/utf8test.sma +++ b/plugins/testsuite/utf8test.sma @@ -1,3 +1,12 @@ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + #include /** @@ -231,4 +240,4 @@ public OnServerCommand() DestroyDataPack(d); showResult(); -} \ No newline at end of file +} diff --git a/plugins/tfc/plmenu.sma b/plugins/tfc/plmenu.sma index 488bec26..5ed9b16c 100755 --- a/plugins/tfc/plmenu.sma +++ b/plugins/tfc/plmenu.sma @@ -1,36 +1,15 @@ -/* AMX Mod X -* Players Menu Plugin -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// Players Menu Plugin +// #include #include diff --git a/plugins/tfc/stats.sma b/plugins/tfc/stats.sma index 7f61e723..5daa79c4 100755 --- a/plugins/tfc/stats.sma +++ b/plugins/tfc/stats.sma @@ -1,20 +1,28 @@ -/* AMX Mod script. -* -* (c) 2004, SidLuke -* This file is provided as is (no warranties). -* -* Plugin works with Stats Settings Plugin. Just run both of them. -* By amx_statscfg command (from Stats Settings Plugin) -* you will be able to set all settings and save them to a file. -* -* Example of usage for some options: -* amx_statscfg on SayTop15 -* amx_statscfg on SayRank -* -* Accept able are also parts of name: -* amx_statscfg off say -* amx_statscfg on End -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 SidLuke. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TFC Stats Plugin +// + +// Plugin works with Stats Settings Plugin. Just run both of them. +// By amx_statscfg command (from Stats Settings Plugin) +// you will be able to set all settings and save them to a file. +// +// Example usage for some options: +// amx_statscfg on SayTop15 +// amx_statscfg on SayRank +// +// Acceptable are also parts of name: +// amx_statscfg off say +// amx_statscfg on End #include #include diff --git a/plugins/tfc/stats_logging.sma b/plugins/tfc/stats_logging.sma index 6c739068..801257fa 100755 --- a/plugins/tfc/stats_logging.sma +++ b/plugins/tfc/stats_logging.sma @@ -1,36 +1,15 @@ -/* AMX Mod X -* Stats Logging Plugin -* -* by the AMX Mod X Development Team -* originally developed by JustinHoMi -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TFC Stats Logging Plugin +// #include #include diff --git a/plugins/tfc/statssounds.sma b/plugins/tfc/statssounds.sma index c4353e73..f5827e08 100755 --- a/plugins/tfc/statssounds.sma +++ b/plugins/tfc/statssounds.sma @@ -1,6 +1,15 @@ -/* -* Plugin for sounds precache -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TFC Sounds Precache Plugin +// #include @@ -26,4 +35,4 @@ public plugin_precache(){ public plugin_init() { register_plugin("TFC Sounds Precache",AMXX_VERSION_STR,"AMXX Dev Team") -} \ No newline at end of file +} diff --git a/plugins/tfc/tfcstats.sma b/plugins/tfc/tfcstats.sma index d0425c82..5dc4d980 100755 --- a/plugins/tfc/tfcstats.sma +++ b/plugins/tfc/tfcstats.sma @@ -1,9 +1,18 @@ -/* Get Score for TFC STATS. - * - * (c) 2004, SidLuke - * This file is provided as is (no warranties). - * - * Function calculates position in rank. +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 SidLuke. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TFC Stats Rank Calculation +// + +/* Function calculates position in rank. * * Stats: * 0 - kills @@ -22,4 +31,4 @@ public get_score(stats[8],body[8]) { return stats[0] - stats[1] /* kills - deaths */ -} \ No newline at end of file +} diff --git a/plugins/timeleft.sma b/plugins/timeleft.sma index 5c67c58e..ae785b8d 100755 --- a/plugins/timeleft.sma +++ b/plugins/timeleft.sma @@ -1,36 +1,15 @@ -/* AMX Mod X -* TimeLeft Plugin -* -* by the AMX Mod X Development Team -* originally developed by OLO -* -* This file is part of AMX Mod X. -* -* -* 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 the -* Free Software Foundation; either version 2 of the License, or (at -* your option) any later version. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software Foundation, -* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* In addition, as a special exception, the author gives permission to -* link the code of this program with the Half-Life Game Engine ("HL -* Engine") and Modified Game Libraries ("MODs") developed by Valve, -* L.L.C ("Valve"). You must obey the GNU General Public License in all -* respects for all of the code used other than the HL Engine and MODs -* from Valve. If you modify this file, you may extend this exception -* to your version of the file, but you are not obligated to do so. If -* you do not wish to do so, delete this exception statement from your -* version. -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TimeLeft Plugin +// #include diff --git a/plugins/ts/stats.sma b/plugins/ts/stats.sma index 7e58ce89..419dabe3 100755 --- a/plugins/ts/stats.sma +++ b/plugins/ts/stats.sma @@ -1,20 +1,28 @@ -/* AMX Mod script. -* -* (c) 2004, SidLuke -* This file is provided as is (no warranties). -* -* Plugin works with Stats Settings Plugin. Just run both of them. -* By amx_statscfg command (from Stats Settings Plugin) -* you will be able to set all settings and save them to a file. -* -* Example of usage for some options: -* tsstatscfg on SayTop15 -* tsstatscfg on SayRank -* -* Accept able are also parts of name: -* tsstatscfg off say -* tsstatscfg on End -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 SidLuke. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TS Stats Plugin +// + +// Plugin works with Stats Settings Plugin. Just run both of them. +// By amx_statscfg command (from Stats Settings Plugin) +// you will be able to set all settings and save them to a file. +// +// Example usage for some options: +// amx_statscfg on SayTop15 +// amx_statscfg on SayRank +// +// Acceptable are also parts of name: +// amx_statscfg off say +// amx_statscfg on End #include #include diff --git a/plugins/ts/stats_logging.sma b/plugins/ts/stats_logging.sma index baf57b2e..22144deb 100755 --- a/plugins/ts/stats_logging.sma +++ b/plugins/ts/stats_logging.sma @@ -1,10 +1,16 @@ -/* AMX Mod script. (Feb 4th, 2003) - * - * Stats Logging - * by JustinHoMi - * TS changes by SidLuke - * - */ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2003 JustinHoMi. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TS Stats Logging Plugin +// #include #include diff --git a/plugins/ts/statssounds.sma b/plugins/ts/statssounds.sma index ca8b34f2..20598000 100755 --- a/plugins/ts/statssounds.sma +++ b/plugins/ts/statssounds.sma @@ -1,6 +1,15 @@ -/* -* Plugin for sounds precache -*/ +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TS Sounds Precache Plugin +// #include @@ -26,4 +35,4 @@ public plugin_precache(){ public plugin_init() { register_plugin("TS Sounds Precache",AMXX_VERSION_STR,"AMXX Dev Team") -} \ No newline at end of file +} diff --git a/plugins/ts/tsstats.sma b/plugins/ts/tsstats.sma index f22f083b..f60dadd5 100755 --- a/plugins/ts/tsstats.sma +++ b/plugins/ts/tsstats.sma @@ -1,9 +1,18 @@ -/* Get Score for TS STATS. - * - * (c) 2004, SidLuke - * This file is provided as is (no warranties). - * - * Function calculates position in rank. +// vim: set ts=4 sw=4 tw=99 noet: +// +// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO"). +// Copyright (C) The AMX Mod X Development Team. +// Copyright (C) 2004 SidLuke. +// +// This software is licensed under the GNU General Public License, version 3 or higher. +// Additional exceptions apply. For full license details, see LICENSE.txt or visit: +// https://alliedmods.net/amxmodx-license + +// +// TS Stats Rank Calculation +// + +/* Function calculates position in rank. * * Stats: * 0 - kills @@ -14,7 +23,7 @@ * 5 - hits * 6 - damage * - * File location: $moddir/addons/amxmodx/data/tsstats.amxx + * File location: $moddir/addons/amxmodx/data/tstats.amxx */ #include @@ -22,4 +31,4 @@ public get_score(stats[8],body[8]) { return stats[0] - stats[1] - stats[3] /* kills - deaths - TKs */ -} \ No newline at end of file +} diff --git a/public/ITextParsers.h b/public/ITextParsers.h new file mode 100644 index 00000000..0f88be9e --- /dev/null +++ b/public/ITextParsers.h @@ -0,0 +1,458 @@ +/** + * vim: set ts=4 : + * ============================================================================= + * SourceMod + * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. + * ============================================================================= + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License, version 3.0, as published by the + * Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + * + * As a special exception, AlliedModders LLC gives you permission to link the + * code of this program (as well as its derivative works) to "Half-Life 2," the + * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software + * by the Valve Corporation. You must obey the GNU General Public License in + * all respects for all other code used. Additionally, AlliedModders LLC grants + * this exception to all derivative works. AlliedModders LLC defines further + * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), + * or . + * + * Version: $Id$ + */ + +#ifndef _INCLUDE_SOURCEMOD_TEXTPARSERS_INTERFACE_H_ +#define _INCLUDE_SOURCEMOD_TEXTPARSERS_INTERFACE_H_ + +/** + * @file ITextParsers.h + * @brief Defines various text/file parsing functions, as well as UTF-8 support code. + */ +namespace SourceMod +{ + + #define SMINTERFACE_TEXTPARSERS_NAME "ITextParsers" + #define SMINTERFACE_TEXTPARSERS_VERSION 4 + + /** + * The INI file format is defined as: + * WHITESPACE: 0x20, \n, \t, \r + * IDENTIFIER: A-Z a-z 0-9 _ - , + . $ ? / + * STRING: Any set of symbols + * + * Basic syntax is comprised of SECTIONs. + * A SECTION is defined as: + * [SECTIONNAME] + * OPTION + * OPTION + * OPTION... + * + * SECTIONNAME is an IDENTIFIER. + * OPTION can be repeated any number of times, once per line. + * OPTION is defined as one of: + * KEY = "VALUE" + * KEY = VALUE + * KEY + * Where KEY is an IDENTIFIER and VALUE is a STRING. + * + * WHITESPACE should always be omitted. + * COMMENTS should be stripped, and are defined as text occurring in: + * ; + * + * Example file below. Note that + * The second line is technically invalid. The event handler + * must decide whether this should be allowed. + * --FILE BELOW-- + * [gaben] + * hi = clams + * bye = "NO CLAMS" + * + * [valve] + * cannot + * maintain + * products + */ + + /** + * @brief Contains parse events for INI files. + */ + class ITextListener_INI + { + public: + /** + * @brief Returns version number. + */ + virtual unsigned int GetTextParserVersion1() + { + return SMINTERFACE_TEXTPARSERS_VERSION; + } + public: + /** + * @brief Called when starting parsing. + */ + virtual void ReadINI_ParseStart() + { + }; + + /** + * @brief Called when ending parsing. + * + * @param halted True if abnormally halted, false otherwise. + */ + virtual void ReadINI_ParseEnd(bool halted) + { + } + + /** + * @brief Called when a new section is encountered in an INI file. + * + * @param section Name of section in between the [ and ] characters. + * @param invalid_tokens True if invalid tokens were detected in the name. + * @param close_bracket True if a closing bracket was detected, false otherwise. + * @param extra_tokens True if extra tokens were detected on the line. + * @param curtok Contains current token in the line where the section name starts. + * You can add to this offset when failing to point to a token. + * @return True to keep parsing, false otherwise. + */ + virtual bool ReadINI_NewSection(const char *section, bool invalid_tokens, bool close_bracket, bool extra_tokens, unsigned int *curtok) + { + return true; + } + + /** + * @brief Called when encountering a key/value pair in an INI file. + * + * @param key Name of key. + * @param value String containing value (with quotes stripped, if any). + * @param invalid_tokens Whether or not the key contained invalid tokens. + * @param equal_token There was an '=' sign present (in case the value is missing). + * @param quotes Whether value was enclosed in quotes. + * @param curtok Contains the token index of the start of the value string. + * This can be changed when returning false. + * @return True to keep parsing, false otherwise. + */ + virtual bool ReadINI_KeyValue(const char *key, const char *value, bool invalid_tokens, bool equal_token, bool quotes, unsigned int *curtok) + { + return true; + } + + /** + * @brief Called after a line has been preprocessed, if it has text. + * + * @param line Contents of line. + * @param curtok Pointer to optionally store failed position in string. + * + * @return True to keep parsing, false otherwise. + */ + virtual bool ReadINI_RawLine(const char *line, unsigned int *curtok) + { + return true; + } + }; + + /** + * :TODO: write this in CFG (context free grammar) format so it makes sense + * + * The SMC file format is defined as: + * WHITESPACE: 0x20, \n, \t, \r + * IDENTIFIER: Any ASCII character EXCLUDING ", {, }, ;, //, / *, or WHITESPACE. + * STRING: Any set of symbols enclosed in quotes. + * Note: if a STRING does not have quotes, it is parsed as an IDENTIFIER. + * + * Basic syntax is comprised of SECTIONBLOCKs. + * A SECTIONBLOCK defined as: + * + * SECTIONNAME + * { + * OPTION + * } + * + * OPTION can be repeated any number of times inside a SECTIONBLOCK. + * A new line will terminate an OPTION, but there can be more than one OPTION per line. + * OPTION is defined any of: + * "KEY" "VALUE" + * SECTIONBLOCK + * + * SECTIONNAME, KEY, VALUE, and SINGLEKEY are strings + * SECTIONNAME cannot have trailing characters if quoted, but the quotes can be optionally removed. + * If SECTIONNAME is not enclosed in quotes, the entire sectionname string is used (minus surrounding whitespace). + * If KEY is not enclosed in quotes, the key is terminated at first whitespace. + * If VALUE is not properly enclosed in quotes, the entire value string is used (minus surrounding whitespace). + * The VALUE may have inner quotes, but the key string may not. + * + * For an example, see configs/permissions.cfg + * + * WHITESPACE should be ignored. + * Comments are text occurring inside the following tokens, and should be stripped + * unless they are inside literal strings: + * ; + * // + * / * */ + + /** + * @brief Lists actions to take when an SMC parse hook is done. + */ + enum SMCResult + { + SMCResult_Continue, /**< Continue parsing */ + SMCResult_Halt, /**< Stop parsing here */ + SMCResult_HaltFail /**< Stop parsing and return SMCError_Custom */ + }; + + /** + * @brief Lists error codes possible from parsing an SMC file. + */ + enum SMCError + { + SMCError_Okay = 0, /**< No error */ + SMCError_StreamOpen, /**< Stream failed to open */ + SMCError_StreamError, /**< The stream died... somehow */ + SMCError_Custom, /**< A custom handler threw an error */ + SMCError_InvalidSection1, /**< A section was declared without quotes, and had extra tokens */ + SMCError_InvalidSection2, /**< A section was declared without any header */ + SMCError_InvalidSection3, /**< A section ending was declared with too many unknown tokens */ + SMCError_InvalidSection4, /**< A section ending has no matching beginning */ + SMCError_InvalidSection5, /**< A section beginning has no matching ending */ + SMCError_InvalidTokens, /**< There were too many unidentifiable strings on one line */ + SMCError_TokenOverflow, /**< The token buffer overflowed */ + SMCError_InvalidProperty1, /**< A property was declared outside of any section */ + }; + + /** + * @brief States for line/column + */ + struct SMCStates + { + unsigned int line; /**< Current line */ + unsigned int col; /**< Current col */ + }; + + /** + * @brief Describes the events available for reading an SMC stream. + */ + class ITextListener_SMC + { + public: + /** + * @brief Returns version number. + */ + virtual unsigned int GetTextParserVersion2() + { + return SMINTERFACE_TEXTPARSERS_VERSION; + } + public: + /** + * @brief Called when starting parsing. + */ + virtual void ReadSMC_ParseStart() + { + }; + + /** + * @brief Called when ending parsing. + * + * @param halted True if abnormally halted, false otherwise. + * @param failed True if parsing failed, false otherwise. + */ + virtual void ReadSMC_ParseEnd(bool halted, bool failed) + { + } + + /** + * @brief Called when entering a new section + * + * @param states Parsing states. + * @param name Name of section, with the colon omitted. + * @return SMCResult directive. + */ + virtual SMCResult ReadSMC_NewSection(const SMCStates *states, const char *name) + { + return SMCResult_Continue; + } + + /** + * @brief Called when encountering a key/value pair in a section. + * + * @param states Parsing states. + * @param key Key string. + * @param value Value string. If no quotes were specified, this will be NULL, + * and key will contain the entire string. + * @return SMCResult directive. + */ + virtual SMCResult ReadSMC_KeyValue(const SMCStates *states, const char *key, const char *value) + { + return SMCResult_Continue; + } + + /** + * @brief Called when leaving the current section. + * + * @param states Parsing states. + * @return SMCResult directive. + */ + virtual SMCResult ReadSMC_LeavingSection(const SMCStates *states) + { + return SMCResult_Continue; + } + + /** + * @brief Called after an input line has been preprocessed. + * + * @param states Parsing states. + * @param line Contents of the line, null terminated at the position + * of the newline character (thus, no newline will exist). + * @return SMCResult directive. + */ + virtual SMCResult ReadSMC_RawLine(const SMCStates *states, const char *line) + { + return SMCResult_Continue; + } + }; + + /** + * @brief Contains various text stream parsing functions. + */ + class ITextParsers /*: public SMInterface*/ + { + public: + virtual const char *GetInterfaceName() + { + return SMINTERFACE_TEXTPARSERS_NAME; + } + virtual unsigned int GetInterfaceVersion() + { + return SMINTERFACE_TEXTPARSERS_VERSION; + } + virtual bool IsVersionCompatible(unsigned int version) + { + if (version < 2) + { + return false; + } + + return true; + /*return SMInterface::IsVersionCompatible(version);*/ + } + public: + /** + * @brief Parses an INI-format file. + * + * @param file Path to file. + * @param ini_listener Event handler for reading file. + * @param line If non-NULL, will contain last line parsed (0 if file could not be opened). + * @param col If non-NULL, will contain last column parsed (undefined if file could not be opened). + * @return True if parsing succeeded, false if file couldn't be opened or there was a syntax error. + */ + virtual bool ParseFile_INI(const char *file, + ITextListener_INI *ini_listener, + unsigned int *line, + unsigned int *col) =0; + + /** + * @brief Parses an SMC-format text file. + * Note that the parser makes every effort to obey broken syntax. + * For example, if an open brace is missing, but the section name has a colon, + * it will let you know. It is up to the event handlers to decide whether to be strict or not. + * + * @param file Path to file. + * @param smc_listener Event handler for reading file. + * @param states Optional pointer to store last known states. + * @return An SMCError result code. + */ + virtual SMCError ParseFile_SMC(const char *file, + ITextListener_SMC *smc_listener, + SMCStates *states) =0; + + /** + * @brief Converts an SMCError to a string. + * + * @param err SMCError. + * @return String error message, or NULL if none. + */ + virtual const char *GetSMCErrorString(SMCError err) =0; + + public: + /** + * @brief Returns the number of bytes that a multi-byte character contains in a UTF-8 stream. + * If the current character is not multi-byte, the function returns 1. + * + * @param stream Pointer to multi-byte ANSI character string. + * @return Number of bytes in current character. + */ + virtual unsigned int GetUTF8CharBytes(const char *stream) =0; + + /** + * @brief Returns whether the first multi-byte character in the given stream + * is a whitespace character. + * + * @param stream Pointer to multi-byte character string. + * @return True if first character is whitespace, false otherwise. + */ + virtual bool IsWhitespace(const char *stream) =0; + + /** + * @brief Same as ParseFile_SMC, but with an extended error buffer. + * + * @param file Path to file. + * @param smc_listener Event handler for reading file. + * @param states Optional pointer to store last known states. + * @param buffer Error message buffer. + * @param maxsize Maximum size of the error buffer. + * @return Error code. + */ + virtual SMCError ParseSMCFile(const char *file, + ITextListener_SMC *smc_listener, + SMCStates *states, + char *buffer, + size_t maxsize) =0; + + /** + * @brief Parses a raw UTF8 stream as an SMC file. + * + * @param stream Memory containing data. + * @param length Number of bytes in the stream. + * @param smc_listener Event handler for reading file. + * @param states Optional pointer to store last known states. + * @param buffer Error message buffer. + * @param maxsize Maximum size of the error buffer. + * @return Error code. + */ + virtual SMCError ParseSMCStream(const char *stream, + size_t length, + ITextListener_SMC *smc_listener, + SMCStates *states, + char *buffer, + size_t maxsize) =0; + }; + + inline unsigned int _GetUTF8CharBytes(const char *stream) + { + unsigned char c = *(unsigned char *)stream; + if (c & (1<<7)) + { + if (c & (1<<5)) + { + if (c & (1<<4)) + { + return 4; + } + return 3; + } + return 2; + } + return 1; + } +} + +extern SourceMod::ITextParsers *textparsers; + +#endif //_INCLUDE_SOURCEMOD_TEXTPARSERS_INTERFACE_H_ + diff --git a/public/licenses/ACKNOWLEDGEMENTS.txt b/public/licenses/ACKNOWLEDGEMENTS.txt new file mode 100644 index 00000000..9eac9495 --- /dev/null +++ b/public/licenses/ACKNOWLEDGEMENTS.txt @@ -0,0 +1,92 @@ +---------------------------------- +Pawn Abstract Machine and Compiler +---------------------------------- +Copyright (c) ITB CompuPhase, 1997-2005 + +This software is provided "as-is", without any express or implied warranty. +In no event will the authors be held liable for any damages arising from +the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software in + a product, an acknowledgment in the product documentation would be + appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + +-------------------------------------------------------------- +zlib, as used in the AMX Mod X Pawn compiler and plugin loader +-------------------------------------------------------------- +Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu + +--------------------------------- +PCRE, as used in the Regex module +--------------------------------- +Copyright (c) 1997-2014 University of Cambridge + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +You may obtain a copy of the license at + http://www.pcre.org/licence.txt + +----------------------------------------- +libmaxminddb, as used in the GeoIP module +----------------------------------------- +Copyright 2013-2014 MaxMind, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/amxmodx/COPYING b/public/licenses/GPLv2.txt old mode 100755 new mode 100644 similarity index 95% rename from amxmodx/COPYING rename to public/licenses/GPLv2.txt index 5b6e7c66..82fa1daa --- a/amxmodx/COPYING +++ b/public/licenses/GPLv2.txt @@ -1,340 +1,339 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - 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 - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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 + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/public/licenses/GPLv3.txt b/public/licenses/GPLv3.txt new file mode 100644 index 00000000..818433ec --- /dev/null +++ b/public/licenses/GPLv3.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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 + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/public/licenses/LICENSE.txt b/public/licenses/LICENSE.txt new file mode 100644 index 00000000..d46ef88c --- /dev/null +++ b/public/licenses/LICENSE.txt @@ -0,0 +1,34 @@ +AMX MOD X LICENSE INFORMATION +VERSION: AUGUST-04-2014 + +AMX Mod X is licensed under the GNU General Public License, version 3, or (at +your option) any later version. + +As a special exception, the AMX Mod X Development Team gives permission to link +the code of this program with the Half-Life Game Engine ("HL Engine") and +Modified Game Libraries ("MODs") developed via the Half-Life 1 SDK as full +replacements for Valve games. You must obey the GNU General Public License in +all respects for all other code used other than the HL Engine and MODs. This +extension, at your option, may also be granted to works based on AMX Mod X. + +As an additional special exception to the GNU General Public License 3.0, +AlliedModders LLC permits dual-licensing of DERIVATIVE WORKS ONLY (that is, +Pawn/AMX Mod X Plugins and AMX Mod X Modules, or any software built from the AMX +Mod X header files) under the GNU General Public License version 2 "or any +higher version." As such, you may choose for your derivative work(s) to be +compatible with the GNU General Public License version 2 as long as it is also +compatible with the GNU General Public License version 3, via the "or any higher +version" clause. This is intended for compatibility with other software. + +As a final exception to the above, any derivative works created prior to this +date (August 4, 2014) may be exclusively licensed under the GNU General Public +License version 2 (without an "or any higher version" clause) if and only if the +work was already GNU General Public License 2.0 exclusive. This clause is +provided for backwards compatibility only. + +A copy of the GNU General Public License 2.0 is available in GPLv2.txt. +A copy of the GNU General Public License 3.0 is available in GPLv3.txt. + +Some components of AMX Mod X use a license other than the GNU General Public +License. You must also adhere to these additional licenses in all respects. See +ACKNOWLEDGEMENTS.txt for further details. diff --git a/support/PackageScript b/support/PackageScript index ecdce1bd..8fa1e99f 100644 --- a/support/PackageScript +++ b/support/PackageScript @@ -14,6 +14,7 @@ ModPackages = { } folder_list = [ + 'base/addons/amxmodx', 'base/addons/amxmodx/configs', 'base/addons/amxmodx/data', 'base/addons/amxmodx/data/lang', @@ -234,6 +235,9 @@ scripting_files = [ 'testsuite/trietest.sma', 'testsuite/utf8test.sma', 'testsuite/stacktest.sma', + 'testsuite/textparse_test.sma', + 'testsuite/textparse_test.cfg', + 'testsuite/textparse_test.ini', 'include/amxconst.inc', 'include/amxmisc.inc', 'include/amxmodx.inc', @@ -288,6 +292,8 @@ scripting_files = [ 'include/newmenus.inc', 'include/sorting.inc', 'include/sqlx.inc', + 'include/textparse_ini.inc', + 'include/textparse_smc.inc', 'include/time.inc', 'include/vector.inc', ] @@ -303,7 +309,7 @@ for filename in scripting_files: # Copy weird things. weirdfiles = [ - ('dlls/geoip/GeoIP.dat', 'base/addons/amxmodx/data'), + ('dlls/geoip/GeoLite2-Country.mmdb', 'base/addons/amxmodx/data'), ('plugins/esf/ESF_mod_tutorial.txt', 'esf/addons/amxmodx/scripting'), ] @@ -357,3 +363,17 @@ for datafile in datafiles: source = os.path.join(builder.sourcePath, 'plugins', 'lang', datafile), output_path = folder_map['base/addons/amxmodx/data/lang'] ) + +# Copy license files +licenses = [ + 'ACKNOWLEDGEMENTS.txt', + 'GPLv2.txt', + 'GPLv3.txt', + 'LICENSE.txt', +] + +for license in licenses: + builder.AddCopy( + source = os.path.join(builder.sourcePath, 'public', 'licenses', license), + output_path = folder_map['base/addons/amxmodx'] + )