Sign in to follow this  
Followers 0
Thatsgreat2345

UnBan

3 posts in this topic

#1 ·  Posted (edited)

Fixed it got it working :P

Case $msg = $unban
        $return = _GUICtrlListViewGetItemText($ListView2)   
        $return = StringSplit($return,"|")
        MsgBox(0,"asdf",$return[1])
        If $return[1] = "" Then
            MsgBox(0,"Error","No One Selected")
        ElseIf IniRead($members,"Banned Amount","1","") = "1" And $return[1] <> "" Then
            IniDelete($members,"Banned")
            IniWrite($members,"Banned Amount","1","0")
        _GUICtrlListViewDeleteItem($ListView2,_GUICtrlListViewFindItem($ListView2,$return[1]))  

        Else
        $file1 = @TempDir & "\TempBan.ini"
        _FileCreate($file1)
        For $i = 1 to IniRead($members,"Banned Amount","1","")
            IniWrite($file1,"Banned",$i,IniRead($members,"Banned",$i,""))
        Next
        For $i = 1 to IniRead($members,"Banned Amount","1","")
            $string = StringSplit(IniRead($members,"Banned",$i,""),"|")
            If $string[1] = $return[1] Then
                $location = $i
                ExitLoop
            EndIf
        Next
        For $i = 1 to IniRead($members,"Banned Amount","1","")
            IniDelete($members,"Banned",$i)
        Next
        For $i = 1 to IniRead($members,"Banned Amount","1","")
            $read = IniRead($file1,"Banned",$i,"")
            If $i = $location or $ers = 1 Then
                $ers = 1 
            IniWrite($members,"Banned",$i,IniRead($file1,"Banned",$i+1,""))
        Else
            IniWrite($members,"Banned",$i,IniRead($file1,"Banned",$i,""))
        EndIf
    Next
    For $i = 1 to IniRead($members,"Banned Amount","1","")
        If IniRead($members,"Banned",$i,"") = "" Then
            IniDelete($members,"Banned",$i)
        EndIf
    Next
    
    IniWrite($members,"Banned Amount","1",IniRead($members,"Banned Amount","1","")-1)
    $ers = 0
    _GUICtrlListViewDeleteItem($ListView2,_GUICtrlListViewFindItem($ListView2,$string[1]))
    $location = ""
    $ers = 0
EndIf
    EndSelect
    WEnd
Edited by Thatsgreat2345

Share this post


Link to post
Share on other sites



Too much for me to read at the moment.

What do mean by " Unban works for everything but the number 0003 xD"?


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

like ill have 0001, 0002, 0003, and 0004 in the ban window. I choose 0003 , press Unban it unbans 0001. xD but if i do like 0001, 0002 0004 0003 itll unban 0004 properly

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0