Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8815869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:29:01+00:00 2026-06-14T04:29:01+00:00

I am quite an expert when it comes to programming in the MSL language,

  • 0

I am quite an expert when it comes to programming in the MSL language, however I am unfamiliar with raw commands and whatnot.

I am in development of a new script. In this script I would like to check if $4 in what a user says is a registered nick or not but I do not know how to do this.

Thank you very much for any help and/or advice in advanced.

Best Regards,
Tim

Update:

raw 307:*:{ set $+(%,%chan,-,%CheckNick) Registered }
on *:TEXT:*:#:{
    if ($1 == !regtest) {
        set %chan $remove($chan,$chr(35))

        set %CheckNick $4
        whois $4
    }
    if ($($+(%,%chan,-,%CheckNick),$4),5) != $null) {
        do this...
    }
    else {
        else message...
    }
}

I got this to work to check however my if statement to check if the variable has been set or not is being ignored…

Edit:

I tried using this:

checkNickReg $chan $2 $nick

…And echoing this:

  echo -a Target: $1
  echo -a Nick: $2
  echo -a Status: $3
  echo -a Chan: $3 - $chan

I’m trying to get a response to the channel such as; $nick $+ , $1 is not registered/registered/registered but not logged in.

What I’ve posted above is obviously wrong as it doesn’t work, however I’ve tried a few methods and I’m actually not sure how the data is passed on with out the likes of tokenizing or setting variables…

Reply

[01:59:06] <~MrTIMarshall> !isReged mr-dynomite
[01:59:08] <&TornHQ> : mr-dynomite status is: NOTLOGGED

EDIT: mr-dynomite is not currently on, should this not = does not exist or does this check even when their not on, if so this is bloody brillant!!!
[02:00:04] <~MrTIMarshall> !isReged MrTIMarshall
[02:00:04] <&TornHQ> : MrTIMarshall status is: LOGGEDIN

$4 does not seem to work and what is the difference between ‘exists, not logged in’ and ‘recognized, not logged in’?

Also, how does the data get passed on without setting variables or tokenizing?

(P.S. Thank you so much for the help you have dedicated so far!)

Another Edit:

I’ve been taking an in depth look today, am I correct in thinking if 0 or 1 the user is either not on-line or not registered (in the comments it says 0 = does not exists / not online, 1 = not logged in whereas 2 also says not logged in but recognized of which I’m unsure as what recognized means. Otherwise I’m very grateful for this script help and whatnot I’m just unclear on the numbers…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T04:29:02+00:00Added an answer on June 14, 2026 at 4:29 am

    Since you have not specified any particular network I wrote an outline for some common networks around (that actually have user authentication systems). You should be able to add many other networks following the pattern.

    Basically you execute /checkNickReg <target> <nick> [optional extra data] and when the server replays with the registration info (if applicable) use the on isReged signal event to handle the reply. Everything else is pretty much transparent.

    EDIT: Looks like the specified network you are using (Torn) uses the standard anope services. So I updated the code to support that network.

    ; triggers when you get nick registration info back
    ; $1 = Target
    ; $2 = Nick
    ; $3 = Status, can be: LOGGEDIN, RECOGNIZED, NOTLOGGED
    ; $4- = Everything else passed
    on *:signal:isReged:{
      echo -a Target: $1
      echo -a Nick: $2
      echo -a Status: $3
      echo -a Else: $4-
    }
    
    ; reg lookup routines
    alias checkNickReg {
      set %reg. $+ $network 1
      set %reg.target. $+ $network $1
      set %reg.nick. $+ $network $2
      set %reg.other. $+ $network $3-
    
      ; Freenode uses: NickServ ACC <nick>
      if ($network == Freenode) msg NickServ ACC $2
      ; Rizon/SwiftIRC/OFTC/Torn use: NickServ STATUS <nick>
      elseif ($istok(Rizon SwiftIRC OFTC Torn, $network, 32)) msg NickServ STATUS $2
    }
    
    ; listen for replays
    on *:notice:*:*:{
      if ($($+(%, reg., $network),2)) {
        ;
        var %target = $($+(%, reg.target., $network),2)
        var %nick = $($+(%, reg.nick., $network),2)
        var %other = $($+(%, reg.other., $network),2)
        ;
        unset %reg*. $+ $network
    
        if (($network == FreeNode) && ($2 == ACC)) $&
          || (($istok(Rizon SwiftIRC OFTC Torn, $network, 32)) && ($1 == STATUS)) {
    
          ; FreeNode:
    
          ; 0 = does not exist
          ; 1 = exists, not logged in
          ; 2 = recognized, not logged in
          ; 3 = logged in
    
          ; Rizon/SwiftIRC/OFTC/Torn:
    
          ; 0 = does not exists / not online
          ; 1 = not logged in
          ; 2 = recognized, not logged in
          ; 3 = logged in
    
          if ($3 < 2) var %status = NOTLOGGED
          elseif ($3 == 2) var %status = RECOGNIZED
          else var %status = LOGGEDIN
        }
    
        ;send status signal
        .signal isReged %target %nick %status %other 
      }
    }
    

    (Extra Note: It might be useful to add an extra check to make sure $nick is AuthServ/NickServ for security reasons.)

    A simple usage example is:

    ; Just a basic example of how to call it.
    on *:text:!isReged &:#:{
      checkNickReg $chan $2 $nick
    }
    
    on *:signal:isReged:{
      msg $1 $4: $2 status is: $3
    }
    

    Type !isReged <nick>

    Edit: The data gets passed to the on isReged event via global variables. I set them in the checkNickReg alias and I clean them up in the on notice event. So you never see them because they get cleaned up. They are passed to the isReged signal event in $1-.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I still haven't quite got this Intent thing down when it comes to the
I'm working with quite large graphs in notebook (I'm not a Mathematica expert). Every
Dear experts, I am quite new to javascript and I often see coders use
Quite new to maven here so let me explain first what I am trying
Is it possible?. I am quite new to ActionScript 3 & have been playing
This is a very standard newbie question, but I am looking for an expert
I'm not a perl expert and I don't quite get how all of perl's
I am quite new to the Mac Terminal environment. I donwloaded sqlplus (which is
I am sure that this must be quite a common problem so I would
I am quite a beginner when it comes to Oracle. I am having trouble

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.