Check-in [ea4794eca7]
Overview
Comment:Better implementation of NICK cleaning
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ea4794eca7be6804391e42278155173ef04e5932
User & Date: rkeene on 2016-09-15 03:18:02
Other Links: manifest | tags
Context
2016-09-15
03:18
Fixed missing update check-in: c19d78c4de user: rkeene tags: trunk
03:18
Better implementation of NICK cleaning check-in: ea4794eca7 user: rkeene tags: trunk
03:13
Added additional NICK syntax support check-in: 658b5cfcc1 user: rkeene tags: trunk
Changes

Modified ircd.tcl from [9fa24bb136] to [cc8b6d5fe5].

102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
	return
    }
    if {$line eq {}} return
    set line [string trim $line]
    debug "([clientState $fd]:$fd) [clientNick $fd] -> '$line'"
    if {[clientState $fd] eq {UNREGISTERED}} {
	if {[regexp -nocase {NICK +([^ ]+)$} $line -> nick]} {
            if {[string index $nick 0] eq ":"} {
                set nick [string range $nick 1 end]
            }
	    if {[nickToFd $nick] ne {}} {
		rawMsg $fd "433 * $nick :Nickname is already in use."
		return
	    }
	    clientNick $fd $nick
	    nickToFd $nick $fd
	    if {[clientUser $fd] ne {}} {







<
|
<







102
103
104
105
106
107
108

109

110
111
112
113
114
115
116
	return
    }
    if {$line eq {}} return
    set line [string trim $line]
    debug "([clientState $fd]:$fd) [clientNick $fd] -> '$line'"
    if {[clientState $fd] eq {UNREGISTERED}} {
	if {[regexp -nocase {NICK +([^ ]+)$} $line -> nick]} {

            stripColon nick

	    if {[nickToFd $nick] ne {}} {
		rawMsg $fd "433 * $nick :Nickname is already in use."
		return
	    }
	    clientNick $fd $nick
	    nickToFd $nick $fd
	    if {[clientUser $fd] ne {}} {