This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Need Your Assistance on Eggdrop Userfiles.

Old posts that have not been replied to for several years.
Locked
User avatar
CoMMy
Halfop
Posts: 99
Joined: Thu Jul 24, 2003 1:03 am
Location: Cyprus

Need Your Assistance on Eggdrop Userfiles.

Post by CoMMy »

Hey Guys,
I need your help.

Can you write me a tcl that checks all users flags that exist in the eggdrops userfile and if someone doesnt have the "o" flag
(both global and channel) to remove the user?

Thank you
(c) CoMMy (c)
Resistance is Futile!!
We Are The Borg!!
User avatar
CrazyCat
Revered One
Posts: 1359
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

Code: Select all

foreach $thisuser [userlist] {
   if {![matchattr $thisuser o]} {
      deluser $thisuser
   }
}
must be bugged, but you may correct it easily
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

foreach $thisuser [userlist] {
could be wrong on this but .. doesn't the $ need to be removed from thisuser variable when it's set ??

probably mestake :p
XplaiN but think of me as stupid
User avatar
CrazyCat
Revered One
Posts: 1359
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

sorry :) too fast, too bad ...

Sure, it's

Code: Select all

foreach thisuser [userlist] {
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

hehe sorry didn't mean to be someone who points out mestakes thats easy ;)
XplaiN but think of me as stupid
User avatar
CoMMy
Halfop
Posts: 99
Joined: Thu Jul 24, 2003 1:03 am
Location: Cyprus

Post by CoMMy »

Thanks guys but i think i made a mistake in the question. Sorry about that. My Mistake.
What i wanted is to delete any user that DOES NOT have the "o" flag.
Thanx again.
(c) CoMMy (c)
Resistance is Futile!!
We Are The Borg!!
User avatar
CrazyCat
Revered One
Posts: 1359
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

well, so learn tcl's basis...

Code: Select all

[matchattr $thisuser o]
means "if this user is o flagged..."
and

Code: Select all

![matchattr $thisuser o]
(note the !) means "if this user isn't o flagged"
User avatar
CoMMy
Halfop
Posts: 99
Joined: Thu Jul 24, 2003 1:03 am
Location: Cyprus

Post by CoMMy »

Thanks Man.
(c) CoMMy (c)
Resistance is Futile!!
We Are The Borg!!
Locked