ID:1676051
 
Resolved
The new connection type argument to IsBanned() had incorrect values sometimes.
BYOND Version:507
Operating System:Windows 7 Home Premium 64-bit
Web Browser:IE 11.0.9600.xxx and Chrome Version 37.0.2062.103
Applies to:DM Language
Status: Resolved (507.1257)

This issue has been resolved.
Build 507.1255

Descriptive Problem Summary:
Receiving the messaging when running the code that does not contain the "web" connection type.

Numbered Steps to Reproduce Problem:
Run the code below and check web user connection. Unable to check other values right this moment unless someone connects to game (sorry).

Code Snippet (if applicable) to Reproduce Problem:
world/IsBanned(key,address,computer_id,type)
world.log << "[key] connecting using client [type]."


Expected Results:
It to display "web" or null as indicated in the reference.

Actual Results:
displays /client as if it were a client object. When trying to view type:connection, a runtime error occurs.
[type: type of connection if known (see client.connection)]
Does the problem occur:
Every time? Or how often? Every time

Workarounds? Testing...
I'm not seeing an issue here. I connected with the webclient via remote IP and got the correct output. I'll need something more concrete to test.
Lummox JR changed status to 'Unverified'
My Project

Also hosting at here.

If you login, I delay 5 seconds the print of the output for world/IsBanned() "[key] connecting using client [type]." so remote users can view the output too.
I'm still not seeing anything to indicate a type value that doesn't match one of the known types. Your test project doesn't behave any differenly here than mine.

I'll try release code to see if there's any difference at all, in case the debug build is hiding this somehow.

[edit]
Nope. No problems in release mode.
Are you seeing 'web' or null? I downloaded the .zip of 1255 and tested in there. Looks like it returns null for me using this.
I'm never seeing null. I see a blank string sometimes in the example from your other thread, which I'm looking at, but never in IsBanned().

In the call to IsBanned(), the fourth arg is never anything but a string. It sounds to me like it is a string in your case, just a bogus one (/client instead of http, for instance). Yet I can't reproduce this in any of my tests.
I've remove the software and reinstalled. Looks like I am now getting: "Pirion connecting using client /list" on first world boot. If I reboot, it isn't null, and it isn't empty string...but it looks like null/empty string on output to world.log and its length is 0.

    if(type == "") world.log << "Empty string"
else if(type == null) world.log << "Null string"
else
world.log << "something else...?"
if(length("[type]")>0)

var/r = ""
for(var/x in 1 to length("[type]"))
r = "[r][text2ascii("[type]",x)],"
world.log << r
else world.log << "Len is 0"


No change in code initially from /client to /list.
I can't get type to be anything.
    IsBanned(key, address, computer_id, type)
log << "new connection: [type] ([type == null && 1], [type == "" && 2], [istype(type, /client) && 3])"
return ..()
// 99% of the time, it outputs:
// new connection: (0, 0, 0)

If I join using the Join button in Dream Daemon, I don't think IsBanned() is called at all.
Right, only remote connections call this. I've been looking at the webclient connection only.

Retested in .1256 - It is still giving me /list on first run, and nothing on second.
Lummox JR resolved issue with message:
The new connection type argument to IsBanned() had incorrect values sometimes.