Deprecate the stream operator

This commit is contained in:
Arokha Sieyes
2020-02-12 17:26:44 -05:00
committed by Leshana
parent c8a8987610
commit 47ccc655db
762 changed files with 4492 additions and 4464 deletions

View File

@@ -51,13 +51,13 @@
return
if(!usr.client.holder || !(usr.client.holder.rights & R_PERMISSIONS))
usr << "<font color='red'>You do not have permission to do this!</font>"
to_chat(usr, "<font color='red'>You do not have permission to do this!</font>")
return
establish_db_connection()
if(!dbcon.IsConnected())
usr << "<font color='red'>Failed to establish database connection</font>"
to_chat(usr, "<font color='red'>Failed to establish database connection</font>")
return
if(!adm_ckey || !new_rank)
@@ -85,14 +85,14 @@
insert_query.Execute()
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.`erro_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added new admin [adm_ckey] to rank [new_rank]');")
log_query.Execute()
usr << "<font color='blue'>New admin added.</font>"
to_chat(usr, "<font color='blue'>New admin added.</font>")
else
if(!isnull(admin_id) && isnum(admin_id))
var/DBQuery/insert_query = dbcon.NewQuery("UPDATE `erro_admin` SET rank = '[new_rank]' WHERE id = [admin_id]")
insert_query.Execute()
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.`erro_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Edited the rank of [adm_ckey] to [new_rank]');")
log_query.Execute()
usr << "<font color='blue'>Admin rank changed.</font>"
to_chat(usr, "<font color='blue'>Admin rank changed.</font>")
/datum/admins/proc/log_admin_permission_modification(var/adm_ckey, var/new_permission)
if(config.admin_legacy_system) return
@@ -101,12 +101,12 @@
return
if(!usr.client.holder || !(usr.client.holder.rights & R_PERMISSIONS))
usr << "<font color='red'>You do not have permission to do this!</font>"
to_chat(usr, "<font color='red'>You do not have permission to do this!</font>")
return
establish_db_connection()
if(!dbcon.IsConnected())
usr << "<font color='red'>Failed to establish database connection</font>"
to_chat(usr, "<font color='red'>Failed to establish database connection</font>")
return
if(!adm_ckey || !new_permission)
@@ -140,10 +140,10 @@
insert_query.Execute()
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.`erro_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Removed permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]');")
log_query.Execute()
usr << "<font color='blue'>Permission removed.</font>"
to_chat(usr, "<font color='blue'>Permission removed.</font>")
else //This admin doesn't have this permission, so we are adding it.
var/DBQuery/insert_query = dbcon.NewQuery("UPDATE `erro_admin` SET flags = '[admin_rights | new_permission]' WHERE id = [admin_id]")
insert_query.Execute()
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.`erro_admin_log` (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]')")
log_query.Execute()
usr << "<font color='blue'>Permission added.</font>"
to_chat(usr, "<font color='blue'>Permission added.</font>")