All pastes #253496 Raw Edit

Something

public text v1 · immutable
#253496 ·published 2006-11-20 20:32 UTC
rendered paste body
    umsg $nick Dark background: $str($chr(160),15) Light Background:
    umsg $nick $chr(160)

    %info  = $ini(Data\config.db,User_Themes_Light,0)
    %info2 = $ini(Data\config.db,User_Themes_Dark,0)

    if ( %info < %info2 ) { %info = %info2 }

    var %l_stub, %d_stub, %y = 1

    while (%y <= %info) {
      %l_stub = $ini(Data\config.db,User_Themes_Dark,%y)
      %d_stub = $ini(Data\config.db,User_Themes_Light,%y)

      if (%l_stub != $null) {
        %light = $+([,$ucol($nick,%l_stub).2,]:) $gettok($readini(Data\config.db,User_Themes_Light,%l_stub),4,58)
      }
      if (%d_stub != $null) {
        %dark = $+([,$ucol($nick,%d_stub).2,]:) $gettok($readini(Data\config.db,User_Themes_Dark,%d_stub),4,58)
      }
  
      umsg $nick $chr(160) %dark $str($chr(160),$calc(38 - $len(%dark))) %light
      unset %light %dark

      inc %y
    }

Example config.db
[User_Themes_Light]
L1=02:07:03:Default1
L2=02:07:03:Default1
[User_Themes_Dark]
D1=02:00:12:NightCrawler