Originally Posted By: Horstl
Yes, and no smile
Yes - if you "/writeini <ini> [mytopic] <item> <data>", "$readini(<ini>,[mytopic],<item>)" will return <data>.

But, no - because the "~" char is used internally for both "[" and "]". All three chars ("~" "[" and "]") will be equivalent.
In the concrete case with the ~-char left aside (rarely allowed in nicknames) the problem is the indifference of "[" vs "]":
"[nick]" and "]nick[" - two separate nicknames in the IRC world - will share the same ini-topic.
Code:
//writeini test.ini [test] x a | writeini test.ini ]test[ x b | echo -a $readini(test.ini,[test],x) vs. $readini(test.ini,]test[,x)


Edit: But my suggestion won't solve the problem either, it would create ~nick~ for item as well.
Because rounded brackets usually are not allowed for nicknames the OP might use, as a workaround something like:
Code:
alias -l sb.writeini { writeini $1 $sb.rep($2-3) $4- }
alias -l sb.readini { return $readini($1, $sb.rep($2),$sb.rep($3)) }
alias -l sb.rep { return $replace($1-,[,$chr(40),],$chr(41)) }

And:
- /sb.writeini instead of /writeini
- $sb.readini() instead of $readini()


I test this too and saw that it works see what i mean:

Code:
alias ic {
  ; IC = Id check , $ic(nick)
  if ($1) {
    if (!$readini(ini\ops.ini,$1,nick)) { return Not-admin }
    if ($readini(ini\ops.ini,$1,level) == 10) { return Game-admin }
    if ($readini(ini\ops.ini,$1,level) == 20) { return Head-admin }
    if ($readini(ini\ops.ini,$1,level) == 30) { return Root-admin }
  }
}
on *:TEXT:*!admininfo*:#prive: {
  if ($2) { 
    .msg $nick Stats: $ic($2)
  }
  else { .msg $chan Error, Wrong syntax! - !admininfo <nickname> }
}

OPS.ini FILE >

[~testuser~]
nick=[testuser]
level=20
pass=12345


i Did a test with this code see the resaults :

[14:26:11] <westor> !admininfo [testuser]
[14:26:13] <[TEST]-Gather> Stats: Head-admin

P.S: So it is not an miRC bug because the resault was corrected!