Replaces lentext with length

This commit is contained in:
Unknown
2019-12-12 13:13:18 -05:00
parent 6dd6940332
commit f68a82b81f
23 changed files with 59 additions and 59 deletions

View File

@@ -377,13 +377,13 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
if(playercid)
cidsearch = "AND computerid = '[playercid]' "
else
if(adminckey && lentext(adminckey) >= 3)
if(adminckey && length(adminckey) >= 3)
adminsearch = "AND a_ckey LIKE '[adminckey]%' "
if(playerckey && lentext(playerckey) >= 3)
if(playerckey && length(playerckey) >= 3)
playersearch = "AND ckey LIKE '[playerckey]%' "
if(playerip && lentext(playerip) >= 3)
if(playerip && length(playerip) >= 3)
ipsearch = "AND ip LIKE '[playerip]%' "
if(playercid && lentext(playercid) >= 7)
if(playercid && length(playercid) >= 7)
cidsearch = "AND computerid LIKE '[playercid]%' "
if(dbbantype)

View File

@@ -55,11 +55,11 @@ GLOBAL_PROTECT(VVpixelmovement)
// the type with the base type removed from the begaining
var/fancytype = types[D.type]
if (findtext(fancytype, types[type]))
fancytype = copytext(fancytype, lentext(types[type])+1)
var/shorttype = copytext("[D.type]", lentext("[type]")+1)
if (lentext(shorttype) > lentext(fancytype))
fancytype = copytext(fancytype, length(types[type])+1)
var/shorttype = copytext("[D.type]", length("[type]")+1)
if (length(shorttype) > length(fancytype))
shorttype = fancytype
if (!lentext(shorttype))
if (!length(shorttype))
shorttype = "/"
.["[D]([shorttype])\ref[D]#[i]"] = D