Roxen.git / server / etc / modules / Variable.pmod / module.pmod

version» Context lines:

Roxen.git/server/etc/modules/Variable.pmod/module.pmod:1: - // $Id: module.pmod,v 1.27 2000/10/10 17:26:17 nilsson Exp $ + // $Id: module.pmod,v 1.28 2000/11/02 11:41:05 per Exp $      #include <module.h>   #include <roxen.h>      // Locale macros   //<locale-token project="roxen_config"> LOCALE </locale-token>      #if constant(Locale.translate)   #define LOCALE(X,Y) \    ([string](mixed)Locale.translate("roxen_config",roxenp()->locale->get(),X,Y))
Roxen.git/server/etc/modules/Variable.pmod/module.pmod:1197:    port = "http://*:"+port+"/";    }    string protocol, host, path;       if(!strlen( port ) )    return ({ "Empty URL field", port });       if(sscanf( port, "%[^:]://%[^/]%s", protocol, host, path ) != 3)    return ({""+port+" does not conform to URL syntax\n", port });    -  if( path == "" ) +  if( path == "" || path[-1] != '/' )    {    warning += "Added / to the end of "+port+"\n"; -  path = "/"; +  path += "/";    }    if( nofhttp && protocol == "fhttp" )    {    warning += "Changed " + protocol + " to http\n";    protocol = "http";    }    if( protocol != lower_case( protocol ) )    {    warning += "Changed "+protocol+" to "+ lower_case( protocol )+"\n";    protocol = lower_case( protocol );