Changeset 5362


Ignore:
Timestamp:
06/19/09 08:24:57 (3 years ago)
Author:
szabgab
Message:

slightly better nickname generation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/padre.perlide.org/irc.html

    r5361 r5362  
    5050    if (loc > 0) { 
    5151        var val = window.location.toString().substr(loc + 1); 
    52         //alert(val); 
    5352        var pairs = val.split("&"); 
    54 //alert(pairs); 
    55 //alert(pairs.length); 
    5653        var data = Array; 
    5754        for (var i = 0; i < pairs.length; i++) { 
    5855        var pair = pairs[i].split("="); 
    59 //      alert(pair[0] + " = " + pair[1]); 
    6056        data[pair[0]] = pair[1]; 
    6157        } 
    6258        return data; 
    6359    } else { 
    64         return; 
     60        return []; 
    6561    } 
    6662} 
     
    6864</script> 
    6965<p> 
    70 Please select a nick name and click on one of the links. 
     66Please select a nickname and click on one of the links. 
    7167</p> 
    7268<form name="n"> 
     
    7773<!-- 
    7874todo: check values received on the url: 
    79    nick name,  
    8075   hash_key (maybe that should be host_channel instead of of our own special name) 
    8176    
    8277   redirect to selected url 
    83    have drop-down box with list of channels ? 
     78   have drop-down box with list of channels or radio buttons ?? 
    8479   show the localized channels first ? 
    85    better random nick generator 
    8680    
    87    if all the necessary in 
    88     
     81   if all the necessary input is available don't even show this page just redirec to  
     82   the mibbit service 
     83 
    8984--> 
    9085 
     
    9792} else { 
    9893    var nick = Math.floor(Math.random()*10000); 
    99     document.forms.n.nickname.value = nick; 
     94    document.forms.n.nickname.value = "user_" + nick; 
    10095} 
    10196 
Note: See TracChangeset for help on using the changeset viewer.