Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function IpAlias(player)
- {
- local ip = player.IP;
- local q = QuerySQL(aDB,"SELECT iip,inick FROM ipalias WHERE iip LIKE '"+ip+"'");
- if( GetSQLColumnData(q,0) == null )
- {
- local query = format("UPDATE ipalias SET inick='"+player.Name+"',iip='"+ip+"'");
- QuerySQL(query);
- }
- else
- {
- local i = 0;
- while ( i < GetSQLColumnCount(q) )
- {
- if ( GetSQLColumnCount ( q, 1 ) != player.Name )
- {
- local query = format("INSERT INTO ipalias (inick,iip) VALUES ('%s','%s')",player.Name,ip.tostring());
- break;
- }
- local q = GetSQLNextRow(q);
- i++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement