Advertisement
Guest User

Untitled

a guest
Feb 14th, 2016
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. # shroudBNC - an object-oriented framework for IRC
  2. # Copyright (C) 2005-2014 Gunnar Beutner
  3. #
  4. # This program is free software; you can redistribute it and/or
  5. # modify it under the terms of the GNU General Public License
  6. # as published by the Free Software Foundation; either version 2
  7. # of the License, or (at your option) any later version.
  8. #
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17.  
  18. proc qauth:migrate_users {} {
  19. foreach user [bncuserlist] {
  20. set quser [getbncuser $user tag quser]
  21. set qpass [getbncuser $user tag qpass]
  22. set qx [getbncuser $user tag qx]
  23.  
  24. if {$quser == "" || $qpass == ""} {
  25. continue
  26. }
  27.  
  28. setbncuser $user tag authuser $quser
  29. setbncuser $user tag authpass $qpass
  30. setbncuser $user tag auth on
  31.  
  32. setbncuser $user tag quser ""
  33. setbncuser $user tag qpass ""
  34.  
  35. if {[string equal -nocase $qx "on"]} {
  36. set automodes [getbncuser $user automodes]
  37. append automodes "+x"
  38. setbncuser $user automodes $automodes
  39. }
  40. }
  41. }
  42.  
  43. qauth:migrate_users
  44.  
  45. source scripts/auth.tcl
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement