All pastes #596319 Raw Edit

Someone

public text v1 · immutable
#596319 ·published 2007-06-29 21:28 UTC
rendered paste body
Hello, here are the errors it is something about the write.ini ( this isnt my script it is merricks but im just fixing it for him. )

* /writeini: insufficient parameters (line 128, pm-script.ini)
-
* /writeini: insufficient parameters (line 154, pm-script.ini)
-
* /writeini: insufficient parameters (line 163, pm-script.ini)

Menu Channel,status,query { 
  .Tools
  .PM System:{ If (!$Dialog(PMSystem)) { /Dialog -m PMSystem PMSystem } } 
} 
dialog PMSystem { 
  title "PM System v1.0" 
  size -1 -1 167 52 
  option dbu 
  list 1, 2 4 85 36, size vsbar 
  button "Accept", 2, 90 4 37 12 
  button "Decline", 3, 127 4 37 12 
  button "Auto Decline", 5, 127 19 37 12 
  button "Auto Accept", 4, 90 19 37 12 
  check "Block All", 6, 54 40 34 10 
  button "Note", 7, 3 41 21 9 
  button "Ignore", 8, 110 33 29 11 
} 
Alias Ignore { 
  If ($comchan($1,0) >= 1) { 
    Writeini -n PMSystem.ini $Address($1,2) Type Ignore 
    Echo -a $1 ( $+ $Address($1,2) $+ ) added to ignore list. 
  } 
  Elseif ($1) { 
    Write PMSystem.ini $1 Type Ignore 
    Echo -a $1 ( $+ $Address($1,2) $+ ) added to ignore list. 
  } 
  Else { 
    Write PMSystem.ini $Address(%AwayCurrentNick,2) Type Ignore 
    Echo -a $1 ( $+ $Address($1,2) $+ ) added to ignore list. 
  } 
} 
Alias y { 
  Msg %AwayCurrentNick [PM System v1.0] Your PM has been accepted. 
  DelNick %AwayCurrentNick 
  If ($did(PMSystem,1,$did(PMSystem,1).lines).text) { 
    Set %AwayCurrentNick $Gettok($did(PMSystem,1,$did(PMSystem,1).lines).text,1,32) 
    Echo -a %AwayCurrentNick is still awaiting an answer, Accept PM? (/y or /n) 
  } 
} 
Alias n { 
  Msg %AwayCurrentNick [PM System v1.0] Your PM has been declined. 
  DelNick %AwayCurrentNick 
  Close -m %AwayCurrentNick 
  If ($did(PMSystem,1,$did(PMSystem,1).lines).text) { 
    Set %AwayCurrentNick $Gettok($did(PMSystem,1,$did(PMSystem,1).lines).text,1,32) 
    Echo -a %AwayCurrentNick is still awaiting an answer, Accept PM? (/y or /n) 
  } 
} 
Alias ya { 
  Msg %AwayCurrentNick [PM System v1.0] Your PM has been accepted. 
  Msg %AwayCurrentNick [PM System v1.0] You have been added to my auto-accept list. 
  Writeini -n PMSystem.ini $Address(%AwayCurrentNick,2) Type Accept 
  DelNick %AwayCurrentNick 
  If ($did(PMSystem,1,$did(PMSystem,1).lines).text) { 
    Set %AwayCurrentNick $Gettok($did(PMSystem,1,$did(PMSystem,1).lines).text,1,32) 
    Echo -a %AwayCurrentNick is still awaiting an answer, Accept PM? (/y or /n) 
  } 
} 
Alias na { 
  Msg %AwayCurrentNick [PM System v1.0] Your PM has been declined. 
  Msg %AwayCurrentNick [PM System v1.0] You have been added to my auto-decline list. 
  Writeini -n PMSystem.ini $Address(%AwayCurrentNick,2) Type Decline 
  DelNick %AwayCurrentNick 
  Close -m %AwayCurrentNick 
  If ($did(PMSystem,1,$did(PMSystem,1).lines).text) { 
    Set %AwayCurrentNick $Gettok($did(PMSystem,1,$did(PMSystem,1).lines).text,1,32) 
    Echo -a %AwayCurrentNick is still awaiting an answer, Accept PM? (/y or /n) 
  } 
} 
Alias denyall { Clearall } 
Alias -l ClearAll { 
  Var %x = 1, %y = $did(PmSystem,1).lines 
  While (%x <= %y) { 
    Msg $Gettok($did(PmSystem,1,%x).text,1,32) [PM System v1.0] Your PM has been declined. 
    Did -d PMSystem 1 %x 
    Close -m $Gettok($did(PmSystem,1,%x),1,32) 
    Inc %x 
  } 
} 
Alias -l DelNick { 
  Var %x = 1, %y = $did(PmSystem,1).lines 
  While (%x <= %y) { 
    If ($1 == $Gettok($Did(PMSystem,1,%x).text,1,32)) { 
      Did -d PMSystem 1 %x 
    } 
    Inc %x 
  } 
} 
On *:CLOSE:?:{ 
  Var %x = 1 
  While (%x <= %y) { 
    If ($Target == $Gettok($Did(PMSystem,1,%x).text,1,32)) { 
      Msg $Target [PM System v1.0] Your PM has been declined. 
      DelNick $Target 
    } 
    Else { DelNick $Target } 
    Inc %x 
  } 
} 
On *:OPEN:?:{ 
  If ($Dialog(PMSystem)) { 
    If (%PMSystemNote) { Msg $Nick Note: %PMSystemNote } 
    If ($Did(PMSystem,6).state == 1) { 
      Msg $Nick [PM System v1.0] I am currently blocking all PMs. Try again later. 
      Close -m $Nick 
    } 
    ElseIf ($Nick isin %Declines) { Close -m $Nick } 
    Elseif ($Readini(PmSystem.ini, n, $Address($Nick,2),Type) == Ignore) { Close -m $Nick } 
    ElseIf ($Readini(PMSystem.ini, n, $Address($Nick,2),Type) == Accept) { Msg $Nick [PM System v1.0] Your PM has been accepted. } 
    ElseIf ($Readini(PMSystem.ini, n, $Address($Nick,2),Type) == Decline) { 
      Msg $Nick [PM System v1.0] Your PM has been declined. 
      Close -m $Nick 
    } 
    Else { 
      Var %Time = $Asctime(hh:nn:ss) 
      If (%PMSystemNote) { Msg $Nick Note: %PMSystemNote  } 
      Did -a PMSystem 1 $Nick %Time 
      .Timer $+ $Nick $+ $r(1,10000) 1 300 .Msg $Nick [PM System v1.0] Your PM has timed out after 5 minutes and has been auto-declined. 
      .Timer $+ $Nick $+ $r(1,10000) 1 300 .Close -m $Nick 
      .Timer $+ $Nick $+ $r(1,10000) 1 300 .DelNick $Nick 
      Msg $Nick Please wait for your PM to be accepted or declined. 
      Echo -a $Nick says $qt($1-) $+ , Accept PM? (/y or /n) 
      Set %AwayCurrentNick $Nick 
    } 
  } 
} 
On *:DIALOG:PMSystem:Sclick:8:{ 
  Writeini -n PMSystem.ini $Address($Gettok($Did(1).seltext,1,32),2) Type Ignore 
  Close -m $Gettok($Did(1).seltext,1,32) 
} 
On *:DIALOG:PMSystem:Sclick:7:{ 
  Set %PMSystemNote $input(Leave a note:,eo,Note) 
} 
On *:DIALOG:PMSystem:Sclick:2:{ 
  If ($Gettok($Did(1).seltext,1,32)) { 
    Msg $Gettok($Did(1).seltext,1,32) [PM System v1.0] Your PM has been accepted. 
    Did -d PMSystem 1 $did(PMSystem,1,1).sel 
    .Timer $+ $Gettok($Did(1).seltext,1,32) $+ * Off 
  } 
} 
On *:DIALOG:PMSystem:Sclick:3:{ 
  If ($Gettok($Did(1).seltext,1,32)) { 
    Msg $Gettok($Did(1).seltext,1,32) [PM System v1.0] Your PM has been declined. 
    Close -m $Gettok($Did(1).seltext,1,32) 
    Did -d PMSystem 1 $did(PMSystem,1,1).sel 
    .Timer $+ $Gettok($Did(1).seltext,1,32) $+ * Off 
    Set %Declines $Addtok(%Declines,$Gettok($Did(1).seltext,1,32),32) 
  } 
} 
On *:DIALOG:PMSystem:Sclick:4:{ 
  If ($Gettok($Did(1).seltext,1,32)) { 
    Msg $Gettok($Did(1).seltext,1,32) [PM System v1.0] Your PM has been accepted. 
    Msg $Gettok($Did(1).seltext,1,32) [PM System v1.0] You have been added to my auto-accept list. 
    Writeini -n PMSystem.ini $Address($Gettok($Did(1).seltext,1,32),2) Type Accept 
    Did -d PMSystem 1 $did(PMSystem,1,1).sel 
    .Timer $+ $Gettok($Did(1).seltext,1,32) $+ * Off 
  } 
} 
On *:DIALOG:PMSystem:Sclick:5:{ 
  If ($Gettok($Did(1).seltext,1,32)) { 
    Msg $Gettok($Did(1).seltext,1,32) [PM System v1.0] Your PM has been declined. 
    Msg $Gettok($Did(1).seltext,1,32) [PM System v1.0] You have been added to my auto-decline list. 
    Writeini -n PMSystem.ini $Address($Gettok($Did(1).seltext,1,32),2) Type Decline 
    Did -d PMSystem 1 $did(PMSystem,1,1).sel 
    .Timer $+ $Gettok($Did(1).seltext,1,32) $+ * Off 
    Set %Declines $Addtok(%Declines,$Gettok($Did(1).seltext,1,32),32) 
  } 
}