Hi all!
I'm trying to get all the bans of the Ban list in the moment that I join a channel, so I can then handle them from a hash list (adding every ban mask and aditional info via /hadd). I'm using $ibl(...), so I made an On JOIN event that triggers only if $nick == $me.
The problem comes when I notice that on that event, if I try getting the $ibl of that $chan, the total number of bans is always 0 ($ibl($chan, 0) == 0), so something tells me that the internal ban list is not updated in the moment I join that channel.
I tried setting a timer that triggers one minute after my join, but didn't work. Also tried with /updatenl and didn't work. The only way is double-clicking on the channel for viewing the ban list, so after that I can access all bans with $ibl($chan, ...).
Could someone tell me if is there any way for updating the IBL without double-clicking on the channel?
Sorry, my english is not very good but I hope you understood what I mean
Thanx a lot in advance!
On *:JOIN:#: {
if ($nick == $me) {
var %bans.i 1
updatenl
var %bans.totalbans $ibl($chan, 0)
; The following line always shows %bans.totalbans = 0 -> Need to update $ibl here!
echo -s Totalbans' value is: %bans.totalbans
while (%bans.i <= %bans.totalbans) {
hadd $chan $ibl($chan, %bans.i) $ibl($chan, %bans.i).by $+ $chr(38) $+ $ibl($chan, %bans.i).date
inc %bans.i
}
}
}