1.1_01 - removed debugging features that were overlooked in previous version. 2012: 1.1 - Complete rewrite, added many commands, new messages, ban system, now zcmd instead of dcmd, dini instead of dudb. 1.0 (Beta) - added /clearchat, changed some messages for admins to be hidden 0.2 - Added IRC Support, IRC commands, hopefully fixed /spec. 0.1 - initial release
C:\Documents and Settings\user\Desktop\SAMPS\filterscripts\SPK-admin.pwn(11) : fatal error 100: cannot read from file: "dudb" Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
Originally Posted by MinZ|Spark
Code:
C:\Documents and Settings\user\Desktop\SAMPS\filterscripts\SPK-admin.pwn(11) : fatal error 100: cannot read from file: "dudb" Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. |
/* * DUDB functions * © Copyright 2006-2007 by DracoBlue * * @version : 2.3 * @author : DracoBlue (http://dracoblue.net) * @date : 8th May 2006 * @update : 3rd June 2007 * @require : DUtils 1.8 * @require : DINI 1.5 * * This Unit is provided as is (no warranties). * Feel free to use it, a little message in * about box is honouring thing, isn't it? * */ #if defined _dudb_included #endinput #endif #define _dudb_included #pragma library dutils #include <dutils> #include <dini> #define dUser(%1).( udb_User(%1, #define dUserINT(%1).( udb_UserInt(%1, #define dUserSet(%1).( udb_UserSet(%1, #define dUserSetINT(%1).( udb_UserSetInt(%1, #define dUserSetFLOAT(%1).( udb_UserSetFloat(%1, #define dUserFLOAT(%1).( udb_UserFloat(%1, stock udb_hash(buf[]) { new length=strlen(buf); new s1 = 1; new s2 = 0; new n; for (n=0; n<length; n++) { s1 = (s1 + buf[n]) % 65521; s2 = (s2 + s1) % 65521; } return (s2 << 16) + s1; } stock udb_encode(nickname[]) { new tmp[MAX_STRING]; set(tmp,nickname); tmp=strreplace("_","_00",tmp); tmp=strreplace(";","_01",tmp); tmp=strreplace("!","_02",tmp); tmp=strreplace("/","_03",tmp); tmp=strreplace("\\","_04",tmp); tmp=strreplace("[","_05",tmp); tmp=strreplace("]","_06",tmp); tmp=strreplace("?","_07",tmp); tmp=strreplace(".","_08",tmp); tmp=strreplace("*","_09",tmp); tmp=strreplace("<","_10",tmp); tmp=strreplace(">","_11",tmp); tmp=strreplace("{","_12",tmp); tmp=strreplace("}","_13",tmp); tmp=strreplace(" ","_14",tmp); tmp=strreplace("\"","_15",tmp); tmp=strreplace(":","_16",tmp); tmp=strreplace("|","_17",tmp); tmp=strreplace("=","_18",tmp); return tmp; } stock udb_decode(nickname[]) { new tmp[MAX_STRING]; set(tmp,nickname); tmp=strreplace("_01",";",tmp); tmp=strreplace("_02","!",tmp); tmp=strreplace("_03","/",tmp); tmp=strreplace("_04","\\",tmp); tmp=strreplace("_05","[",tmp); tmp=strreplace("_06","]",tmp); tmp=strreplace("_07","?",tmp); tmp=strreplace("_08",".",tmp); tmp=strreplace("_09","*",tmp); tmp=strreplace("_10","<",tmp); tmp=strreplace("_11",">",tmp); tmp=strreplace("_12","{",tmp); tmp=strreplace("_13","}",tmp); tmp=strreplace("_14"," ",tmp); tmp=strreplace("_15","\"",tmp); tmp=strreplace("_16",":",tmp); tmp=strreplace("_17","|",tmp); tmp=strreplace("_18","=",tmp); tmp=strreplace("_00","_",tmp); return tmp; } stock udb_Exists(nickname[]) { new tmp[MAX_STRING]; format(tmp,sizeof(tmp),"%s.dudb.sav",udb_encode(nickname)); return fexist(tmp); } stock udb_Remove(nickname[]) { new tmp[MAX_STRING]; format(tmp,sizeof(tmp),"%s.dudb.sav",udb_encode(nickname)); return dini_Remove(tmp); } stock udb_UserSetInt(nickname[],key[],value) { new fname[MAX_STRING]; format(fname,sizeof(fname),"%s.dudb.sav",udb_encode(nickname)); return dini_IntSet(fname,key,value); } stock udb_UserSetFloat(nickname[],key[],Float:value) { new fname[MAX_STRING]; format(fname,sizeof(fname),"%s.dudb.sav",udb_encode(nickname)); return dini_FloatSet(fname,key,value); } stock udb_UserSet(nickname[],key[],value[]) { new fname[MAX_STRING]; format(fname,sizeof(fname),"%s.dudb.sav",udb_encode(nickname)); return dini_Set(fname,key,value); } stock udb_User(nickname[],key[]) { new fname[MAX_STRING]; format(fname,sizeof(fname),"%s.dudb.sav",udb_encode(nickname)); format(fname,sizeof(fname),dini_Get(fname,key)); return fname; } stock Float:udb_UserFloat(nickname[],key[]) { new fname[MAX_STRING]; format(fname,sizeof(fname),"%s.dudb.sav",udb_encode(nickname)); return dini_Float(fname,key); } stock udb_UserInt(nickname[],key[]) { new fname[MAX_STRING]; format(fname,sizeof(fname),"%s.dudb.sav",udb_encode(nickname)); return dini_Int(fname,key); } stock udb_CheckLogin(nickname[],pwd[]) { new fname[MAX_STRING]; format(fname,sizeof(fname),"%s.dudb.sav",udb_encode(nickname)); if (udb_UserInt(nickname,"password_hash")==udb_hash(pwd)) return true; return false; } stock udb_Create(nickname[],pwd[]) { if (udb_Exists(nickname)) return false; new fname[MAX_STRING]; format(fname,sizeof(fname),"%s.dudb.sav",udb_encode(nickname)); dini_Create(fname); udb_UserSetInt(nickname,"password_hash",udb_hash(pwd)); return true; }
C:\Documents and C:\Documents and Settings\user\Desktop\SAMPS\filterscripts\SPK-admin.pwn(1826) : warning 203: symbol is never used: "gBotID" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning.
Originally Posted by MinZ|Spark
Code:
C:\Documents and C:\Documents and Settings\user\Desktop\SAMPS\filterscripts\SPK-admin.pwn(1826) : warning 203: symbol is never used: "gBotID" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning. The bots doesnt join IRC! |
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase