mIRC Home    About    Download    Register    News    Help

Print Thread
#256381 13/01/16 06:37 PM
Joined: Jan 2016
Posts: 43
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Jan 2016
Posts: 43
I have a seen script that I found-and it works for the most part-but it needs some tweaking...I want it to ignore exit messages (such as Quits: @techchef blah blah blah)...I also want it-for the ones who are still in chat to say the last thing they said-instead of saying techchef, cheftech is still in #Channel. Any help is 1000000000% appreciated!

(edit) Just wanted to add-this is for an IRC Chatroom through Efnet...

Code:
On 1:TEXT:!seen:#:{
  msg $chan $nick $+ , there are $findfile($mircdir\seen,*.*,0) seen records in my database. Please refine your search.
}
On 1:TEXT:Suggest seen *:#:{
  set %SugSeen102 * $+ $3 $+ *.*
  .timer 1 1 /notice $nick [ClubCX AI] Based on your search, I would suggest you are looking for one of the following nicknames:
  .timer 1 3 /notice $nick $remove($nopath($findfile($mircdir\seen,%SugSeen102,1)),.ini)
  .timer 1 5 /notice $nick $remove($nopath($findfile($mircdir\seen,%SugSeen102,2)),.ini)
  .timer 1 7 /notice $nick $remove($nopath($findfile($mircdir\seen,%SugSeen102,3)),.ini)
  .timer 1 9 /notice $nick $remove($nopath($findfile($mircdir\seen,%SugSeen102,4)),.ini)
  .timer 1 11 /notice $nick $remove($nopath($findfile($mircdir\seen,%SugSeen102,5)),.ini)
  .timer 1 13 /notice $nick You can refine your search even more by supplying a better query. For example, *TAR* instead of *AR*
}
On 1:TEXT:!seen *:#:{
  ; if the guy is looking for u
  if ($chr(42) isin $2) {
    set %Seen102 * $+ $2 $+ *.*
    msg $chan [ClubCX AI] $nick $+ , there are $findfile($mircdir\seen,%Seen102,0) matching records in my database. To list them, type: suggest seen $2 
  }
  elseif ($2 == $me) { 
    /msg $chan $2 is here $nick 
    .goto end 
  }
  ; if the guy is so stupid that he looks after him self
  elseif ($2 == $nick) { 
    /msg $chan $nick $+ , you do realise this is a computer don't you? 
    .goto end 
  } 
  ; if the person he's looking for already is in the channel
  elseif ($2 ison $chan) { 
    /msg $chan $nick $+ , $2- is still in $chan $+ .
    .goto end 
  }
  ; else u can allways check the ini files :D
  else { 
    if (($right($2,1) == ]) || ($left($2,1) == [)) { .set %seennick $replace($2,[,@) | .set %seennick $replace(%seennick,],~) }
    else { .set %seennick $2 }
    ; [ this are going to change @ and ] to ~
    :inifile {
      ; if he's not in the ini files
      .set -u5 %seenaction $readini seen\ $+ $2 $+ .ini %seennick Action
      if (%seenaction == $null) { /msg $chan Sorry $nick $+ , i haven't seen $2- around }
      ; if the latest thing he did was to join the channel
      if (%seenaction == join) { 
        .set -u5 %jointime $readini seen\ $+ $2 $+ .ini %seennick Time
        .set -u5 %joinchannel $readini seen\ $+ $2 $+ .ini %seennick Channel
        /msg $chan $nick $+ , $2- joined %joinchannel $duration($calc($ctime - %jointime)) ago.
      }
      ; om den sista saken va att parta kanalen...
      if (%seenaction == part) { 
        .set -u5 %parttime $readini seen\ $+ $2 $+ .ini %seennick Time
        .set -u5 %partchannel $readini seen\ $+ $2 $+ .ini %seennick Channel
        /msg $chan $nick $+ , $2 parted %partchannel $duration($calc($ctime - %parttime)) ago.
      }
      ; if the latest thing he did was to quit...
      if (%seenaction == quit) { 
        .set -u5 %quittime $readini seen\ $+ $2 $+ .ini %seennick Time
        .set -u5 %quitmessage $readini seen\ $+ $2 $+ .ini %seennick Message
        /msg $chan $nick $+ , $2 quitted with the message %quitmessage $duration($calc($ctime - %quittime)) ago.
      }
      ; if the latest thing he did was to be kicked...
      if (%seenaction == kick) { 
        .set -u5 %kicktime $readini seen\ $+ $2 $+ .ini %seennick Time
        .set -u5 %kickchannel $readini seen\ $+ $2 $+ .ini %seennick Channel
        /msg $chan $nick $+ , $2 was kicked from %kickchannel $duration($calc($ctime - %kicktime)) ago.
      }
      ; if the latest thing he did was to change nickname
      if (%seenaction == nick) { 
        .set -u5 %nicktime $readini seen\ $+ $2 $+ .ini %seennick Time
        .set -u5 %nicknew $readini seen\ $+ $2 $+ .ini %seennick Nick
        /msg $chan $nick $+ , $2 changed his nick to %nicknew $duration($calc($ctime - %nicktime)) ago.
      }
      ; if the latest thing he did was to say something...
      if (%seenaction == text) { 
        .set -u5 %texttime $readini seen\ $+ $2 $+ .ini %seennick Time
        .set -u5 %textchannel $readini seen\ $+ $2 $+ .ini %seennick Channel
        /msg $chan $nick $+ , $2 said something $duration($calc($ctime - %texttime)) ago.
      }
      ; if the latest thing he did was an action
      if (%seenaction == action) { 
        .set -u5 %actiontime $readini seen\ $+ $2 $+ .ini %seennick Time
        .set -u5 %actionchannel $readini seen\ $+ $2 $+ .ini %seennick Channel
        /msg $chan $nick $+ , $2 did an action in %actionchannel $duration($calc($ctime - %actiontime)) ago.
      }
    }
  }
  :end
}

; when someone joins...
On 1:JOIN:#:{
  if (($right($nick,1) == ]) || ($left($nick,1) == [)) { .set %seennick $replace($nick,[,@) | .set %seennick $replace(%seennick,],~) }
  else { .set %seennick $nick }
  ; [ are going to change @ and ] to ~
  .remini seen\ $+ $nick $+ .ini %seennick
  .writeini seen\ $+ $nick $+ .ini %seennick Action join
  .writeini seen\ $+ $nick $+ .ini %seennick Channel $chan 
  .writeini seen\ $+ $nick $+ .ini %seennick Time $ctime
}

; when someone parts the channel
On 1:PART:#:{
  if (($right($nick,1) == ]) || ($left($nick,1) == [)) { .set %seennick $replace($nick,[,@) | .set %seennick $replace(%seennick,],~) }
  else { .set %seennick $nick }
  .remini seen\ $+ $nick $+ .ini %seennick
  .writeini seen\ $+ $nick $+ .ini %seennick Action part
  .writeini seen\ $+ $nick $+ .ini %seennick Channel $chan
  .writeini seen\ $+ $nick $+ .ini %seennick Time $ctime
}

; when someone quits the channel
On 1:QUIT:{
  if (($right($nick,1) == ]) || ($left($nick,1) == [)) { .set %seennick $replace($nick,[,@) | .set %seennick $replace(%seennick,],~) }
  else { .set %seennick $nick }
  .remini seen\ $+ $nick $+ .ini %seennick
  .writeini seen\ $+ $nick $+ .ini %seennick Action quit
  .writeini seen\ $+ $nick $+ .ini %seennick Time $ctime
  .writeini seen\ $+ $nick $+ .ini %seennick Message $1-
}

; when some moron gets kicked
On 1:KICK:#:{
  if (($right($nick,1) == ]) || ($left($nick,1) == [)) { .set %seennick $replace($nick,[,@) | .set %seennick $replace(%seennick,],~) }
  else { .set %seennick $nick }
  .remini seen\ $+ $nick $+ .ini %seennick
  .writeini seen\ $+ $nick $+ .ini %seennick Action kick
  .writeini seen\ $+ $nick $+ .ini %seennick Channel $chan
  .writeini seen\ $+ $nick $+ .ini %seennick Time $ctime
}

; when someone changes nick
On 1:NICK:{
  if (($right($nick,1) == ]) || ($left($nick,1) == [)) { .set %seennick $replace($nick,[,@) | .set %seennick $replace(%seennick,],~) }
  else { .set %seennick $nick }
  .remini seen\ $+ $nick $+ .ini %seennick
  .writeini seen\ $+ $nick $+ .ini %seennick Action nick
  .writeini seen\ $+ $nick $+ .ini %seennick Time $ctime
  .writeini seen\ $+ $nick $+ .ini %seennick Nick $newnick 
}

; when someone say something in the channel
On 1:TEXT:*:#:{
  if (($right($nick,1) == ]) || ($left($nick,1) == [)) { .set %seennick $replace($nick,[,@) | .set %seennick $replace(%seennick,],~) }
  else { .set %seennick $nick }
  .remini seen\ $+ $nick $+ .ini %seennick
  .writeini seen\ $+ $nick $+ .ini %seennick Action text
  .writeini seen\ $+ $nick $+ .ini %seennick Time $ctime
  .writeini seen\ $+ $nick $+ .ini %seennick Channel $chan
  .writeini seen\ $+ $nick $+ .ini %seennick text $1-
}

; when someone makes an action
On 1:ACTION:*:#:{
  if (($right($nick,1) == ]) || ($left($nick,1) == [)) { .set %seennick $replace($nick,[,@) | .set %seennick $replace(%seennick,],~) }
  else { .set %seennick $nick }
  .remini seen\ $+ $nick $+ .ini %seennick
  .writeini seen\ $+ $nick $+ .ini %seennick Action action
  .writeini seen\ $+ $nick $+ .ini %seennick Time $ctime
  .writeini seen\ $+ $nick $+ .ini %seennick Channel $chan
}

Last edited by Techchef; 13/01/16 06:42 PM.
Techchef #256382 13/01/16 06:45 PM
Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Try use this code:

Code:
On 1:TEXT:!seen:#:{
  msg $chan $nick $+ , there are $findfile($mircdir\seen,*.*,0) seen records in my database. Please refine your search.
}
On 1:TEXT:Suggest seen *:#:{
  set %SugSeen102 * $+ $3 $+ *.*
  .timer 1 1 /notice $nick [ClubCX AI] Based on your search, I would suggest you are looking for one of the following nicknames:
  .timer 1 3 /notice $nick $remove($nopath($findfile($mircdir\seen,%SugSeen102,1)),.ini)
  .timer 1 5 /notice $nick $remove($nopath($findfile($mircdir\seen,%SugSeen102,2)),.ini)
  .timer 1 7 /notice $nick $remove($nopath($findfile($mircdir\seen,%SugSeen102,3)),.ini)
  .timer 1 9 /notice $nick $remove($nopath($findfile($mircdir\seen,%SugSeen102,4)),.ini)
  .timer 1 11 /notice $nick $remove($nopath($findfile($mircdir\seen,%SugSeen102,5)),.ini)
  .timer 1 13 /notice $nick You can refine your search even more by supplying a better query. For example, *TAR* instead of *AR*
}
On 1:TEXT:!seen *:#:{
  ; if the guy is looking for u
  if ($chr(42) isin $2) {
    set %Seen102 * $+ $2 $+ *.*
    msg $chan [ClubCX AI] $nick $+ , there are $findfile($mircdir\seen,%Seen102,0) matching records in my database. To list them, type: suggest seen $2 
  }
  elseif ($2 == $me) { 
    /msg $chan $2 is here $nick 
    .goto end 
  }
  ; if the guy is so stupid that he looks after him self
  elseif ($2 == $nick) { 
    /msg $chan $nick $+ , you do realise this is a computer don't you? 
    .goto end 
  } 
  ; if the person he's looking for already is in the channel
  elseif ($2 ison $chan) { 
    .set %seennick $replace($2,[,@) 
    .set %seennick $replace(%seennick,],~)
    .set -u5 %texttime $readini seen\ $+ $2 $+ .ini %seennick Time
    .set -u5 %textchannel $readini seen\ $+ $2 $+ .ini %seennick Channel
    msg $chan $nick $+ , $2 said something $duration($calc($ctime - %texttime)) ago.
    .goto end 
  }
  ; else u can allways check the ini files :D
  else { 
    if (($right($2,1) == ]) || ($left($2,1) == [)) { .set %seennick $replace($2,[,@) | .set %seennick $replace(%seennick,],~) }
    else { .set %seennick $2 }
    ; [ this are going to change @ and ] to ~
    :inifile {
      ; if he's not in the ini files
      .set -u5 %seenaction $readini seen\ $+ $2 $+ .ini %seennick Action
      if (%seenaction == $null) { /msg $chan Sorry $nick $+ , i haven't seen $2- around }
      ; if the latest thing he did was to join the channel
      if (%seenaction == join) { 
        .set -u5 %jointime $readini seen\ $+ $2 $+ .ini %seennick Time
        .set -u5 %joinchannel $readini seen\ $+ $2 $+ .ini %seennick Channel
        /msg $chan $nick $+ , $2- joined %joinchannel $duration($calc($ctime - %jointime)) ago.
      }
      ; om den sista saken va att parta kanalen...
      if (%seenaction == part) { 
        .set -u5 %parttime $readini seen\ $+ $2 $+ .ini %seennick Time
        .set -u5 %partchannel $readini seen\ $+ $2 $+ .ini %seennick Channel
        /msg $chan $nick $+ , $2 parted %partchannel $duration($calc($ctime - %parttime)) ago.
      }
      ; if the latest thing he did was to quit...
      if (%seenaction == quit) { 
        .set -u5 %quittime $readini seen\ $+ $2 $+ .ini %seennick Time
        .set -u5 %quitmessage $readini seen\ $+ $2 $+ .ini %seennick Message
        /msg $chan $nick $+ , $2 quitted with the message %quitmessage $duration($calc($ctime - %quittime)) ago.
      }
      ; if the latest thing he did was to be kicked...
      if (%seenaction == kick) { 
        .set -u5 %kicktime $readini seen\ $+ $2 $+ .ini %seennick Time
        .set -u5 %kickchannel $readini seen\ $+ $2 $+ .ini %seennick Channel
        /msg $chan $nick $+ , $2 was kicked from %kickchannel $duration($calc($ctime - %kicktime)) ago.
      }
      ; if the latest thing he did was to change nickname
      if (%seenaction == nick) { 
        .set -u5 %nicktime $readini seen\ $+ $2 $+ .ini %seennick Time
        .set -u5 %nicknew $readini seen\ $+ $2 $+ .ini %seennick Nick
        /msg $chan $nick $+ , $2 changed his nick to %nicknew $duration($calc($ctime - %nicktime)) ago.
      }
      ; if the latest thing he did was to say something...
      if (%seenaction == text) { 
        .set -u5 %texttime $readini seen\ $+ $2 $+ .ini %seennick Time
        .set -u5 %textchannel $readini seen\ $+ $2 $+ .ini %seennick Channel
        /msg $chan $nick $+ , $2 said something $duration($calc($ctime - %texttime)) ago.
      }
      ; if the latest thing he did was an action
      if (%seenaction == action) { 
        .set -u5 %actiontime $readini seen\ $+ $2 $+ .ini %seennick Time
        .set -u5 %actionchannel $readini seen\ $+ $2 $+ .ini %seennick Channel
        /msg $chan $nick $+ , $2 did an action in %actionchannel $duration($calc($ctime - %actiontime)) ago.
      }
    }
  }
  :end
}

; when someone joins...
On 1:JOIN:#:{
  if (($right($nick,1) == ]) || ($left($nick,1) == [)) { .set %seennick $replace($nick,[,@) | .set %seennick $replace(%seennick,],~) }
  else { .set %seennick $nick }
  ; [ are going to change @ and ] to ~
  .remini seen\ $+ $nick $+ .ini %seennick
  .writeini seen\ $+ $nick $+ .ini %seennick Action join
  .writeini seen\ $+ $nick $+ .ini %seennick Channel $chan 
  .writeini seen\ $+ $nick $+ .ini %seennick Time $ctime
}

; when someone parts the channel
On 1:PART:#:{
  if (($right($nick,1) == ]) || ($left($nick,1) == [)) { .set %seennick $replace($nick,[,@) | .set %seennick $replace(%seennick,],~) }
  else { .set %seennick $nick }
  .remini seen\ $+ $nick $+ .ini %seennick
  .writeini seen\ $+ $nick $+ .ini %seennick Action part
  .writeini seen\ $+ $nick $+ .ini %seennick Channel $chan
  .writeini seen\ $+ $nick $+ .ini %seennick Time $ctime
}

; when some moron gets kicked
On 1:KICK:#:{
  if (($right($nick,1) == ]) || ($left($nick,1) == [)) { .set %seennick $replace($nick,[,@) | .set %seennick $replace(%seennick,],~) }
  else { .set %seennick $nick }
  .remini seen\ $+ $nick $+ .ini %seennick
  .writeini seen\ $+ $nick $+ .ini %seennick Action kick
  .writeini seen\ $+ $nick $+ .ini %seennick Channel $chan
  .writeini seen\ $+ $nick $+ .ini %seennick Time $ctime
}

; when someone changes nick
On 1:NICK:{
  if (($right($nick,1) == ]) || ($left($nick,1) == [)) { .set %seennick $replace($nick,[,@) | .set %seennick $replace(%seennick,],~) }
  else { .set %seennick $nick }
  .remini seen\ $+ $nick $+ .ini %seennick
  .writeini seen\ $+ $nick $+ .ini %seennick Action nick
  .writeini seen\ $+ $nick $+ .ini %seennick Time $ctime
  .writeini seen\ $+ $nick $+ .ini %seennick Nick $newnick 
}

; when someone say something in the channel
On 1:TEXT:*:#:{
  if (($right($nick,1) == ]) || ($left($nick,1) == [)) { .set %seennick $replace($nick,[,@) | .set %seennick $replace(%seennick,],~) }
  else { .set %seennick $nick }
  .remini seen\ $+ $nick $+ .ini %seennick
  .writeini seen\ $+ $nick $+ .ini %seennick Action text
  .writeini seen\ $+ $nick $+ .ini %seennick Time $ctime
  .writeini seen\ $+ $nick $+ .ini %seennick Channel $chan
  .writeini seen\ $+ $nick $+ .ini %seennick text $1-
}

; when someone makes an action
On 1:ACTION:*:#:{
  if (($right($nick,1) == ]) || ($left($nick,1) == [)) { .set %seennick $replace($nick,[,@) | .set %seennick $replace(%seennick,],~) }
  else { .set %seennick $nick }
  .remini seen\ $+ $nick $+ .ini %seennick
  .writeini seen\ $+ $nick $+ .ini %seennick Action action
  .writeini seen\ $+ $nick $+ .ini %seennick Time $ctime
  .writeini seen\ $+ $nick $+ .ini %seennick Channel $chan
}


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
westor #256383 13/01/16 07:05 PM
Joined: Jan 2016
Posts: 43
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Jan 2016
Posts: 43
Now it says "techchef, cheftech said something 19secs ago." and "techchef, cheftech parted #CHANNEL 25mins 42secs ago."

I want it to say the last thing the person said-excluding parting messages...

so !seen would trigger techchef: this is the last thing I said"

Techchef #256389 14/01/16 01:13 PM
Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
This code is a crappy written.

Try use this code:

Code:
On 1:TEXT:!seen:#:{
  msg $chan $nick $+ , there are $findfile($mircdir\seen,*.*,0) seen records in my database. Please refine your search.
}
On 1:TEXT:Suggest seen *:#:{
  set %SugSeen102 * $+ $3 $+ *.*
  .timer 1 1 /notice $nick [ClubCX AI] Based on your search, I would suggest you are looking for one of the following nicknames:
  .timer 1 3 /notice $nick $remove($nopath($findfile($mircdir\seen,%SugSeen102,1)),.ini)
  .timer 1 5 /notice $nick $remove($nopath($findfile($mircdir\seen,%SugSeen102,2)),.ini)
  .timer 1 7 /notice $nick $remove($nopath($findfile($mircdir\seen,%SugSeen102,3)),.ini)
  .timer 1 9 /notice $nick $remove($nopath($findfile($mircdir\seen,%SugSeen102,4)),.ini)
  .timer 1 11 /notice $nick $remove($nopath($findfile($mircdir\seen,%SugSeen102,5)),.ini)
  .timer 1 13 /notice $nick You can refine your search even more by supplying a better query. For example, *TAR* instead of *AR*
}
On 1:TEXT:!seen *:#:{
  ; if the guy is looking for u
  if ($chr(42) isin $2) {
    set %Seen102 * $+ $2 $+ *.*
    msg $chan [ClubCX AI] $nick $+ , there are $findfile($mircdir\seen,%Seen102,0) matching records in my database. To list them, type: suggest seen $2 
  }
  elseif ($2 == $me) { 
    /msg $chan $2 is here $nick 
    .goto end 
  }
  ; if the guy is so stupid that he looks after him self
  elseif ($2 == $nick) { 
    /msg $chan $nick $+ , you do realise this is a computer don't you? 
    .goto end 
  } 
  ; if the person he's looking for already is in the channel
  elseif ($2 ison $chan) {
    .set %seennick $replace($2,[,@) 
    .set %seennick $replace(%seennick,],~)
    .set -u5 %texttime $readini seen\ $+ $2 $+ .ini %seennick Time
    .set -u5 %textchannel $readini seen\ $+ $2 $+ .ini %seennick Channel
    var %txt = $readini(seen\ $+ $2 $+ .ini,%seennick,text)
    if (%txt) { msg $chan $2 $+ : %txt }
    elseif (!%txt) { msg $chan The $2 user did NOT talked into the channel yet! }
    .goto end 
  }
  ; else u can allways check the ini files :D
  else { 
    if (($right($2,1) == ]) || ($left($2,1) == [)) { .set %seennick $replace($2,[,@) | .set %seennick $replace(%seennick,],~) }
    else { .set %seennick $2 }
    ; [ this are going to change @ and ] to ~
    :inifile {
      ; if he's not in the ini files
      .set -u5 %seenaction $readini seen\ $+ $2 $+ .ini %seennick Action
      if (%seenaction == $null) { /msg $chan Sorry $nick $+ , i haven't seen $2- around }
      ; if the latest thing he did was to join the channel
      if (%seenaction == join) { 
        .set -u5 %jointime $readini seen\ $+ $2 $+ .ini %seennick Time
        .set -u5 %joinchannel $readini seen\ $+ $2 $+ .ini %seennick Channel
        /msg $chan $nick $+ , $2- joined %joinchannel $duration($calc($ctime - %jointime)) ago.
      }
      ; om den sista saken va att parta kanalen...
      if (%seenaction == part) { 
        .set -u5 %parttime $readini seen\ $+ $2 $+ .ini %seennick Time
        .set -u5 %partchannel $readini seen\ $+ $2 $+ .ini %seennick Channel
        /msg $chan $nick $+ , $2 parted %partchannel $duration($calc($ctime - %parttime)) ago.
      }
      ; if the latest thing he did was to quit...
      if (%seenaction == quit) { 
        .set -u5 %quittime $readini seen\ $+ $2 $+ .ini %seennick Time
        .set -u5 %quitmessage $readini seen\ $+ $2 $+ .ini %seennick Message
        /msg $chan $nick $+ , $2 quitted with the message %quitmessage $duration($calc($ctime - %quittime)) ago.
      }
      ; if the latest thing he did was to be kicked...
      if (%seenaction == kick) { 
        .set -u5 %kicktime $readini seen\ $+ $2 $+ .ini %seennick Time
        .set -u5 %kickchannel $readini seen\ $+ $2 $+ .ini %seennick Channel
        /msg $chan $nick $+ , $2 was kicked from %kickchannel $duration($calc($ctime - %kicktime)) ago.
      }
      ; if the latest thing he did was to change nickname
      if (%seenaction == nick) { 
        .set -u5 %nicktime $readini seen\ $+ $2 $+ .ini %seennick Time
        .set -u5 %nicknew $readini seen\ $+ $2 $+ .ini %seennick Nick
        /msg $chan $nick $+ , $2 changed his nick to %nicknew $duration($calc($ctime - %nicktime)) ago.
      }
      ; if the latest thing he did was to say something...
      if (%seenaction == text) { 
        .set -u5 %texttime $readini seen\ $+ $2 $+ .ini %seennick Time
        .set -u5 %textchannel $readini seen\ $+ $2 $+ .ini %seennick Channel
        /msg $chan $nick $+ , $2 said something $duration($calc($ctime - %texttime)) ago.
      }
      ; if the latest thing he did was an action
      if (%seenaction == action) { 
        .set -u5 %actiontime $readini seen\ $+ $2 $+ .ini %seennick Time
        .set -u5 %actionchannel $readini seen\ $+ $2 $+ .ini %seennick Channel
        /msg $chan $nick $+ , $2 did an action in %actionchannel $duration($calc($ctime - %actiontime)) ago.
      }
    }
  }
  :end
}

; when someone joins...
On 1:JOIN:#:{
  if (($right($nick,1) == ]) || ($left($nick,1) == [)) { .set %seennick $replace($nick,[,@) | .set %seennick $replace(%seennick,],~) }
  else { .set %seennick $nick }
  ; [ are going to change @ and ] to ~
  .remini seen\ $+ $nick $+ .ini %seennick
  .writeini seen\ $+ $nick $+ .ini %seennick Action join
  .writeini seen\ $+ $nick $+ .ini %seennick Channel $chan 
  .writeini seen\ $+ $nick $+ .ini %seennick Time $ctime
}

; when someone parts the channel
On 1:PART:#:{
  if (($right($nick,1) == ]) || ($left($nick,1) == [)) { .set %seennick $replace($nick,[,@) | .set %seennick $replace(%seennick,],~) }
  else { .set %seennick $nick }
  .remini seen\ $+ $nick $+ .ini %seennick
  .writeini seen\ $+ $nick $+ .ini %seennick Action part
  .writeini seen\ $+ $nick $+ .ini %seennick Channel $chan
  .writeini seen\ $+ $nick $+ .ini %seennick Time $ctime
}

; when some moron gets kicked
On 1:KICK:#:{
  if (($right($nick,1) == ]) || ($left($nick,1) == [)) { .set %seennick $replace($nick,[,@) | .set %seennick $replace(%seennick,],~) }
  else { .set %seennick $nick }
  .remini seen\ $+ $nick $+ .ini %seennick
  .writeini seen\ $+ $nick $+ .ini %seennick Action kick
  .writeini seen\ $+ $nick $+ .ini %seennick Channel $chan
  .writeini seen\ $+ $nick $+ .ini %seennick Time $ctime
}

; when someone changes nick
On 1:NICK:{
  if (($right($nick,1) == ]) || ($left($nick,1) == [)) { .set %seennick $replace($nick,[,@) | .set %seennick $replace(%seennick,],~) }
  else { .set %seennick $nick }
  .remini seen\ $+ $nick $+ .ini %seennick
  .writeini seen\ $+ $nick $+ .ini %seennick Action nick
  .writeini seen\ $+ $nick $+ .ini %seennick Time $ctime
  .writeini seen\ $+ $nick $+ .ini %seennick Nick $newnick 
}

; when someone say something in the channel
On 1:TEXT:*:#:{
  if (($right($nick,1) == ]) || ($left($nick,1) == [)) { .set %seennick $replace($nick,[,@) | .set %seennick $replace(%seennick,],~) }
  else { .set %seennick $nick }
  .remini seen\ $+ $nick $+ .ini %seennick
  .writeini seen\ $+ $nick $+ .ini %seennick Action text
  .writeini seen\ $+ $nick $+ .ini %seennick Time $ctime
  .writeini seen\ $+ $nick $+ .ini %seennick Channel $chan
  .writeini seen\ $+ $nick $+ .ini %seennick text $1-
}

; when someone makes an action
On 1:ACTION:*:#:{
  if (($right($nick,1) == ]) || ($left($nick,1) == [)) { .set %seennick $replace($nick,[,@) | .set %seennick $replace(%seennick,],~) }
  else { .set %seennick $nick }
  .remini seen\ $+ $nick $+ .ini %seennick
  .writeini seen\ $+ $nick $+ .ini %seennick Action action
  .writeini seen\ $+ $nick $+ .ini %seennick Time $ctime
  .writeini seen\ $+ $nick $+ .ini %seennick Channel $chan
}


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
westor #256391 14/01/16 02:36 PM
Joined: Jan 2016
Posts: 43
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Jan 2016
Posts: 43
Good enough! THANKS!!!!!! grin

Techchef #256394 14/01/16 06:38 PM
Joined: Dec 2015
Posts: 148
Vogon poet
Offline
Vogon poet
Joined: Dec 2015
Posts: 148
Like westor said, the script is terrible. It accesses a file multiple times whenever something happens, creates a file for every single user and keeps deleting and recreating it. It'll start freezing mIRC if there's even a bit more stuff happening in the channel(s).

Can't guarantee this works perfectly, but it most definitely works faster.

Code:
alias seenstart {
  hfree -w seen
  hmake seen 500
  if (!$isfile(Seen.db)) write Seen.db
  hload -b seen Seen.db
}

alias -l seentime return $asctime($gmt,yyyy-mm-dd HH:nn:ss) UTC.

alias -l seenshort if ($len($1) > $2) return $left($1,$2) $+ ... | else return $1

on *:start:seenstart

on *:exit:hsave -b seen Seen.db

on *:join:#:hadd seen $nick $gmt $nick joining # channel at $seentime

on *:part:#:hadd seen $nick $gmt $nick leaving # channel $iif($1-,with $qt($seenshort($strip($1-),300)) message,without a message) at $seentime

on *:quit:hadd seen $nick $gmt $nick quitting $iif($1-,with $qt($seenshort($strip($1-),300)) message,without a message) at $seentime

on *:kick:#: {
  hadd seen $knick $gmt $knick getting kicked from # channel by $nick $iif($1-,with $qt($seenshort($strip($1-),300)) message,without a message) at $seentime
  hadd seen $nick $gmt $nick kicking $knick from # channel $iif($1-,with $qt($seenshort($strip($1-),300)) message,without a message) at $seentime
}

on *:nick: {
  hadd seen $nick $gmt $nick changing their name to $newnick at $seentime
  hadd seen $newnick $gmt $nick changing their name to $newnick at $seentime
}

on *:topic:#:hadd seen $nick $gmt $nick changing the topic of # channel to $qt($seenshort($strip($1-),300)) at $seentime

on *:notice:*:#:hadd seen $nick $gmt $nick saying $qt($seenshort($strip($1-),300)) on # at $seentime

ctcp *:*:#:hadd seen $nick $gmt $nick sending $qt($seenshort($strip($1-),300)) CTCP message on # at $seentime

on *:action:*:#:hadd seen $nick $gmt $nick saying $qt($seenshort($strip($1-),300)) on # at $seentime

on *:text:*:#: {
  hadd seen $nick $gmt $nick saying $qt($seenshort($strip($1-),300)) on # at $seentime
  if ($istok(! . @ $ §,$left($1,1),32)) && ($istok(seen s,$mid($1,2-),32)) {
    var %m = $iif($left($1,1) == @,.msg #,.notice $nick)
    if (!$2) %m Error: invalid parameters. Usage: $upper($1) <NAME>
    elseif ($2 == $me) %m I believe I'm right here, although I might be wrong. Maybe I'm just the product of your imagination.
    elseif ($2 == $nick) %m $replacex($gettok(<nick>? Never heard. Probably a loser<44> so who cares?|Oh... I guess you haven't heard? Well<44> this is awkward... <nick> hung themself because of you.|Does not compute: too unimportant person. Replace the user and try again.|<nick> got bitch slapped by an angry fishbot and ran away crying like a little girl.|<nick> is dead. Now go away and stay dead.|Really? REALLY? Seriously? You're really going to do this? FINE! Let's see... <nick> said they were going to a Justin Bieber featuring Rebecca Black concert and would be back when cows fly. I hate you. Everyone hates you. Go and kill yourself.|I heard <nick> is somewhere in the mirror<44> go and take look.|<nick> is behind the dumpster giving a blowjob to a guy for crack.,$rand(1,8),124),<nick>,$nick,<44>,$chr(44))
    elseif ($hget(seen,$2)) { tokenize 32 $v1 | %m I last saw $2- $b($duration($calc($gmt -$1)) ago) }
    elseif ($hget(seen,$hfind(seen,$2,1,w).item)) {
      var %n = $2
      tokenize 32 $v1
      %m I last saw $2- $b($duration($calc($gmt -$1)) ago)
      if ($hfind(seen,%n,0,w) > 1) %m There are also $bytes($calc($v1 -1),b) other(s) whose name matches to $qt(%n) $+ : $seenlistnames(%n)
    }
    else %m I don't know who $2 is.
  }
}

alias -l seenlistnames {
  var %x = 2,%n
  while ($hfind(seen,$1,%x,w)) {
    var %n = %n $v1
    if (%x >= 10) return $replace(%n,$chr(32),$chr(44) $+ $chr(32)) $+ ...
    inc %x
  }
  return $replace(%n,$chr(32),$chr(44) $+ $chr(32))
}

Just put it in remote and restart mIRC or type "/seenstart". After that it'll do everything by itself. If you don't want it to keep track of part/quit/whatever ever events, delete/comment the events. In your case it would be the "on *:quit:..." and "on *:part:..." lines.

You can lookup people with !seen command, as an example: !seen Dazuz. You can search entries with the same command too, just enter whatever you want to look for instead of the name, as an example: !seen D?z*.

Any one of these in front of "seen" or "s" will trigger the command: ! . @ $ §, @ makes the response a channel message instead of notice.

Last edited by Dazuz; 15/01/16 12:11 AM. Reason: faulty eyes and fingers.
Dazuz #256395 14/01/16 08:35 PM
Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
wester? mad mad


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
westor #256398 15/01/16 12:06 AM
Joined: Dec 2015
Posts: 148
Vogon poet
Offline
Vogon poet
Joined: Dec 2015
Posts: 148
Well, that's not good. I can't read or write anymore.

Dazuz #256400 15/01/16 01:10 AM
Joined: Jan 2016
Posts: 43
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Jan 2016
Posts: 43
OK I apologize-i am learning mIRC...I am making progress-but still some stuff i am not getting...
I want it to ignore, when people leave, part and change their nickname...how do I do this? Remove those lines or???

Nevermind...the person who posted this is my stupid evil twin who is afraid of beta testing...I removed the lines and figured it out...Just trying to figure out one more thing now...How to make it post so all can see instead of just one person...

(Again..THANK YOU to everyone who helped me)

Last edited by Techchef; 15/01/16 01:40 AM.
Techchef #256404 15/01/16 02:43 PM
Joined: Dec 2015
Posts: 148
Vogon poet
Offline
Vogon poet
Joined: Dec 2015
Posts: 148
If you're using the script I posted, these are the two important lines:
Code:
;First $istok checks what's in front of the first word, and if it's one of the listed ones (! . @ $ §) it will trigger.
;Second $istok checks if the first word is in the list (seen s), and triggers if it is.
if ($istok(! . @ $ §,$left($1,1),32)) && ($istok(seen s,$mid($1,2-),32)) {

;This checks if the first character in the first word is @ sign, and if it is it changes the message to a public channel message.
;If you want it to always post to channel no matter what, just replace the whole line with this:
;var %m = .msg #
;If you want more than one character to trigger the public message, replace the line with this:
;var %m = $iif($istok(@ ! .,$left($1,1),32),.msg #,.notice $nick)
var %m = $iif($left($1,1) == @,.msg #,.notice $nick)


By default @seen/@s <NAME> makes it public, all the others are notices.

Dazuz #256411 15/01/16 08:55 PM
Joined: Jan 2016
Posts: 43
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Jan 2016
Posts: 43
I am using the code you posted-but i can't seem to make it work with everything I tired..No matter what its posting as a notice or, if i change notice to msg its sending it as a PM..I want it to post for all to see when i do !seen..

Techchef #256413 15/01/16 10:38 PM
Joined: Dec 2015
Posts: 148
Vogon poet
Offline
Vogon poet
Joined: Dec 2015
Posts: 148
Now it will always post it to the channel no matter what.
Code:
alias seenstart {
  hfree -w seen
  hmake seen 500
  if (!$isfile(Seen.db)) write Seen.db
  hload -b seen Seen.db
}

alias -l seentime return $asctime($gmt,yyyy-mm-dd HH:nn:ss) UTC.

alias -l seenshort if ($len($1) > $2) return $left($1,$2) $+ ... | else return $1

on *:start:seenstart

on *:exit:hsave -b seen Seen.db

on *:join:#:hadd seen $nick $gmt $nick joining # channel at $seentime

on *:part:#:hadd seen $nick $gmt $nick leaving # channel $iif($1-,with $qt($seenshort($strip($1-),300)) message,without a message) at $seentime

on *:quit:hadd seen $nick $gmt $nick quitting $iif($1-,with $qt($seenshort($strip($1-),300)) message,without a message) at $seentime

on *:kick:#: {
  hadd seen $knick $gmt $knick getting kicked from # channel by $nick $iif($1-,with $qt($seenshort($strip($1-),300)) message,without a message) at $seentime
  hadd seen $nick $gmt $nick kicking $knick from # channel $iif($1-,with $qt($seenshort($strip($1-),300)) message,without a message) at $seentime
}

on *:nick: {
  hadd seen $nick $gmt $nick changing their name to $newnick at $seentime
  hadd seen $newnick $gmt $nick changing their name to $newnick at $seentime
}

on *:topic:#:hadd seen $nick $gmt $nick changing the topic of # channel to $qt($seenshort($strip($1-),300)) at $seentime

on *:notice:*:#:hadd seen $nick $gmt $nick saying $qt($seenshort($strip($1-),300)) on # at $seentime

ctcp *:*:#:hadd seen $nick $gmt $nick sending $qt($seenshort($strip($1-),300)) CTCP message on # at $seentime

on *:action:*:#:hadd seen $nick $gmt $nick saying $qt($seenshort($strip($1-),300)) on # at $seentime

on *:text:*:#: {
  hadd seen $nick $gmt $nick saying $qt($seenshort($strip($1-),300)) on # at $seentime
  if ($istok(! . @ $ §,$left($1,1),32)) && ($istok(seen s,$mid($1,2-),32)) {
    var %m = .msg #
    if (!$2) %m Error: invalid parameters. Usage: $upper($1) <NAME>
    elseif ($2 == $me) %m I believe I'm right here, although I might be wrong. Maybe I'm just the product of your imagination.
    elseif ($2 == $nick) %m $replacex($gettok(<nick>? Never heard. Probably a loser<44> so who cares?|Oh... I guess you haven't heard? Well<44> this is awkward... <nick> hung themself because of you.|Does not compute: too unimportant person. Replace the user and try again.|<nick> got bitch slapped by an angry fishbot and ran away crying like a little girl.|<nick> is dead. Now go away and stay dead.|Really? REALLY? Seriously? You're really going to do this? FINE! Let's see... <nick> said they were going to a Justin Bieber featuring Rebecca Black concert and would be back when cows fly. I hate you. Everyone hates you. Go and kill yourself.|I heard <nick> is somewhere in the mirror<44> go and take look.|<nick> is behind the dumpster giving a blowjob to a guy for crack.,$rand(1,8),124),<nick>,$nick,<44>,$chr(44))
    elseif ($hget(seen,$2)) { tokenize 32 $v1 | %m I last saw $2- $b($duration($calc($gmt -$1)) ago) }
    elseif ($hget(seen,$hfind(seen,$2,1,w).item)) {
      var %n = $2
      tokenize 32 $v1
      %m I last saw $2- $b($duration($calc($gmt -$1)) ago)
      if ($hfind(seen,%n,0,w) > 1) %m There are also $bytes($calc($v1 -1),b) other(s) whose name matches to $qt(%n) $+ : $seenlistnames(%n)
    }
    else %m I don't know who $2 is.
  }
}

alias -l seenlistnames {
  var %x = 2,%n
  while ($hfind(seen,$1,%x,w)) {
    var %n = %n $v1
    if (%x >= 10) return $replace(%n,$chr(32),$chr(44) $+ $chr(32)) $+ ...
    inc %x
  }
  return $replace(%n,$chr(32),$chr(44) $+ $chr(32))
}

Dazuz #256414 15/01/16 11:01 PM
Joined: Jan 2016
Posts: 43
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Jan 2016
Posts: 43
THANK YOU smile 1,000,000,000 xs THank You! I was changing stuff for the past few hours trying to figure out what command it was that needed to be changed..

Dazuz #257338 30/03/16 06:41 PM
Joined: Jan 2016
Posts: 43
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Jan 2016
Posts: 43
OK-I'm coming back to this because the people who use my chat and the !seen feature wanna know if I can make it Eastern Time or Local time for them?

Techchef #257339 30/03/16 07:18 PM
Joined: Dec 2015
Posts: 148
Vogon poet
Offline
Vogon poet
Joined: Dec 2015
Posts: 148
All you need to do is to edit this alias:
Code:
alias -l seentime return $asctime($gmt,yyyy-mm-dd HH:nn:ss) UTC.

To get it show your local time, change $gmt to $ctime. If you want it to show some random time zone: $calc($gmt <add/take as many hours as you want>) and have fun keeping up with DST and other crap.

Unless you change the script and start storing everyone's time zone, you won't be able to give them customized local times. That will also bring problems with DST and other stuff, which you should try to avoid like plague.

It won't change the existing entries, but all the future ones will have the changed date and time.

Dazuz #257340 30/03/16 07:28 PM
Joined: Jan 2016
Posts: 43
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Jan 2016
Posts: 43
Thanks Dazuz!


Link Copied to Clipboard