mIRC Home    About    Download    Register    News    Help

Print Thread
#150142 28/05/06 09:00 PM
Joined: Aug 2005
Posts: 7
A
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: Aug 2005
Posts: 7
someone made me a pm script and recently it hasnt been working its meant add by the ip address but when they change nicks they cant pm me.

Code:
 menu status,channel,query {
  PM organizer:pmtam
}
dialog pmtam {
  title "PM Organizer"
  size -1 -1 219 160
  option dbu
  box "Allowed Nicknames/IP's", 1, 2 2 87 148
  list 2, 6 10 79 137, size extsel hsbar vsbar
  button "Add", 3, 126 35 46 15
  button "Delete", 4, 93 87 47 14
  button "Wipe", 15, 155 71 47 14
  edit "", 6, 94 16 113 16, autohs autovs
  text "Do not be deceived:", 7, 152 95 50 8
  text "Bad company", 8, 161 105 33 8
  text "corrupts good morals.", 9, 151 115 53 8
  text "1Cor.15:33", 10, 164 124 27 8
  text "Made upon special request from the precious Tammy.", 11, 90 4 128 8, disable
  text "Jacques7", 12, 187 149 25 8, disable
  button "C l o s e", 13, 106 141 69 16, ok cancel
  check "On", 14, 95 58 20 10, push
  button "Edit", 5, 93 110 47 14
}
alias pmtam { dialog -m pmtam pmtam }
on *:DIALOG:pmtam:init:0: { pmtam.list }
alias pmtam.list {
  $iif(%pmtam == on,did -c pmtam 14)
  did -r pmtam 2
  if ($ulist(*,pmtam,0) > 0) {
    var %p = 1
    while (%p <= $ulist(*,pmtam,0)) {
      did -az pmtam 2 $ulist(*,pmtam,%p) $ulist(*,pmtam,%p).info
      inc %p
} } }
on *:DIALOG:pmtam:sclick:*:{
  if ($did == 3) { if ($did(pmtam,6).text) { .auser pmtam $did(pmtam,6).text | did -r pmtam 6 | pmtam.list } }
  if ($did == 4) { If ($?!="Are you sure you want to delete $did(pmtam,2).seltext ?" == $true) { .ruser pmtam $did(pmtam,2).seltext | did -d pmtam 2 $did(pmtam,2).sel } }
  if ($did == 5) { if ($did(pmtam,2).seltext == $null) { var %pmtamm = $input(Select an entry first!,o) | halt } | if ($$input(Edit the entry:,e,Edit,$did(pmtam,2).seltext)) { if ($ifmatch != $did(pmtam,2).seltext) { .auser pmtam $ifmatch | .ruser pmtam $did(pmtam,2).seltext | pmtam.list } } }
  if ($did == 15) { If ($?!="Are you truly sure you want to wipe the list ?" == $true) { .rlevel pmtam | pmtam.list } }
  if ($did == 14) { $iif(%pmtam == on,unset %pmtam,set %pmtam on) }
}
on ^*:OPEN:?: {
  if (%pmtam == on) {
    if ($level($nick) != pmtam) { set -u3 %pmtama. [ $+ [ $nick ] ] on }
    var %p = 0
    while (%p < $ulist(*,pmtam,*)) {
      inc %p
      if ($ulist(*,pmtam,%p) iswm $address($nick,5)) {  set -u3 %pmtamadr. [ $+ [ $nick ] ] off }
    }
    if ((%pmtama. [ $+ [ $nick ] ] == on) && (%pmtamadr. [ $+ [ $nick ] ] != off)) {

      echo -s ~~> $chr(2) $+ $nick $+ $chr(2) tried to PM you @ $time ! Be careful! If you want to add him to your Allow List type /pmtama $nick 
      .msg $nick You are not in my allow list, I cannot accept your messages. | halt
    }
  }
}
alias pmtama { .auser pmtam $1 | echo -a  ---> $1 has been added to your Allow List. | msg $1 [Auto Message] You have been added to my Allow List. }
menu nicklist {
  PM Organizer
  .Add:.auser pmtam $address($$1,8) | echo -a ~~> $+ $chr(2) $+ $address($$1,8) $+ $chr(2) has been added ! | msg $$1 [Auto Message] You have been added to my Allow List.
  .Remove:if ($level($address($$1,8)) == pmtam) { .ruser pmtam $address($$1,8) | echo -a ~~> $+ $chr(2) $+ $address($$1,8) $+ $chr(2) $+ has been removed ! } | else { echo -a ~~> $address($$1,8) has not been found! }
 


it adds them like `angel!*none@*.in-addr.btopenworld.com
instead of like *!*none@*.in-addr.btopenworld.com

#150143 28/05/06 11:31 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Try changing
Code:
.auser pmtam $did(pmtam,6).text  
to
Code:
.auser pmtam $address($did(pmtam,6).text,1)  


The default format when adding a nick to a user list, is in the format that you're getting. By specifying the address (or in this case, getting the address) you can make it more specific or more general (which is what it appears you're wanting)


Link Copied to Clipboard