It seems that my mailer program can't handle underlines in
a message.

This version uses ':=' instead.
-----
"Get the IP Name (such as minnow.cc.gatech.edu) from the
IP Address (such as 130.207.118.114)"
| ipCache user cacheEntry return ipName username |
ipCache := shelf modulesAt: 'ipCache'.
ipName := (user := request user)
        ifNil: ["This sometimes happens during upload requests"
                'not available']
        ifNotNil: [(cacheEntry := ipCache at: user ifAbsent:
[nil])
                ifNil: [(return := NetNameResolver nameForAddress: user
timeout: 15)
                        ifNil: [NetNameResolver stringFromAddress: user]
                        ifNotNil: [ipCache at: user put: (Array with: Time
totalSeconds with: return).
                                return]]
                ifNotNil: [((Time totalSeconds - (cacheEntry at: 1)) >
72000)
                        ifTrue: ["Refresh cache after 20 hours"
                                ipCache removeKey: user.
                                (return := NetNameResolver nameForAddress: user
timeout: 15)
                                        ifNil: [NetNameResolver 
stringFromAddress: user]
                                        ifNotNil: [
                                                ipCache at: user put: (Array 
with: Time totalSeconds
with: return).
                                                return]]
                        ifFalse: [cacheEntry at: 2]]].
username := request security ifNotNil: [request security
user] ifNil: ['unknown'].
username, ':', ipName

--- Uchida Yasuo <[EMAIL PROTECTED]>:
> Hello, I'm glad you liked it.
> 
> You can concatenate two Strings with the binary
> method
> ','.
> 
> Here is a modified version of the getIPName.
> -----
> "Get the IP Name (such as minnow.cc.gatech.edu) from
> the
> IP Address (such as 130.207.118.114)"
> | ipCache user cacheEntry return ipName username |
> ipCache _ shelf modulesAt: 'ipCache'.
> ipName _ (user _ request user)
>       ifNil: ["This sometimes happens during upload
> requests"
>               'not available']
>       ifNotNil: [(cacheEntry _ ipCache at: user ifAbsent:
> [nil])
>               ifNil: [(return _ NetNameResolver nameForAddress:
> user
> timeout: 15)
>                       ifNil: [NetNameResolver stringFromAddress: user]
>                       ifNotNil: [ipCache at: user put: (Array with:
> Time
> totalSeconds with: return).
>                               return]]
>               ifNotNil: [((Time totalSeconds - (cacheEntry at:
> 1)) >
> 72000)
>                       ifTrue: ["Refresh cache after 20 hours"
>                               ipCache removeKey: user.
>                               (return _ NetNameResolver nameForAddress: user
> timeout: 15)
>                                       ifNil: [NetNameResolver 
> stringFromAddress:
> user]
>                                       ifNotNil: [
>                                               ipCache at: user put: (Array 
> with: Time
> totalSeconds
> with: return).
>                                               return]]
>                       ifFalse: [cacheEntry at: 2]]].
> username _ request security ifNotNil: [request
> security
> user] ifNil: ['unknown'].
> username, ':', ipName
> -----
> 
> Truly yours,
> Yasuo Uchida
> 
> --- Derrel Fincher <[EMAIL PROTECTED]> :
> 
> >I figured it would be easy: just concatenate the
> >results
> of currentpage 22 in the swiki with the code >given
> above.
> However, as I tried it Irealized I >didn't know
> enough
> Squeak to make it work. Can >anybody provideany
> suggestions about how to do this? 
> 
> _______________________________________________
> Pws mailing list
> [email protected]
> https://mailman.cc.gatech.edu/mailman/listinfo/pws
> 
_______________________________________________
Pws mailing list
[email protected]
https://mailman.cc.gatech.edu/mailman/listinfo/pws

Reply via email to