Thread: EAB File Server
View Single Post
Old 30 October 2017, 12:55   #1571
modrobert
old bearded fool

modrobert's Avatar
 
Join Date: Jan 2010
Location: Bangkok
Age: 52
Posts: 520
Quote:
Originally Posted by Turran View Post
Not correct. Check user AGN. Fully valid user.
If he tries to create an FTP account:
# python eabpostcount.py AGN
* Found more than one user: AGN

Why? There are other users that has the lettering agn in their name. All of them are valid

http://eab.abime.net/memberlist.php?...&ausername=AGN

That is because memberlist.php uses "like" instead of "=". Its not an exact match were getting.
Yes, but my previous Bourne shell example adds the functionality you want by testing the result/exit code (-ne 0 / != 0) of eab_post_count.py. Here's the example again.

Code:
#!/bin/sh
USER="Turran"
OUTPUT=`eab_post_count.py "$USER"`
RTN=$?
if test $RTN -ne 0 ; then
    # user name not found or incomplete (more than one)
    echo "User not found"
    exit 1
fi
# we have a valid user name
# do your stuff here
echo "Post count: $OUTPUT"
Both incorrect and incomplete (more than one hit) user names will be rejected.

EDIT: I see what you mean now, finally, sorry for the misunderstanding. I will fix it.

Last edited by modrobert; 30 October 2017 at 13:03.
modrobert is offline  
 
Page generated in 0.04233 seconds with 11 queries