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

  • Home
  • SEARCH
  • 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 6829257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:28:46+00:00 2026-05-26T22:28:46+00:00

write(NAMES + channel, writer);//build list of people in channel String[] Users = reader.ReadLine().Split(‘ ‘);//read

  • 0
write("NAMES " + channel, writer);//build list of people in channel
String[] Users = reader.ReadLine().Split(' ');//read the line from NAMES, and split into Users array
String[] sender = nick.Split('!');//Person calling the bot
string[] args = data.Split('-');//Arguments to command (Not listed)
nick = sender[0].Substring(1);//Person callin the bot as above
foreach (string i in Users)
{
    if (i.StartsWith("+") && i.EndsWith(nick) || i.StartsWith("%") && i.EndsWith(nick) || i.StartsWith("@") && i.EndsWith(nick) || i.StartsWith("&") && i.EndsWith(nick) || i.StartsWith("~") && i.EndsWith(nick))
    {
        Roll_Args(nick, args[1], args[2]);//If above is correct, roll the the command
    }
}

For some reason it doesn’t work for @ but it works for the + rank. I don’t know how else to check ranks in IRC.

Is there a more dependable/efficient way to check for ranks in IRC?

Thanks for reading.

Edit: It sometimes doesn’t always work for some people’s usernames/nicknames. For example: @Oh_Herro_Der doesn’t work with the command.

  • 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-05-26T22:28:46+00:00Added an answer on May 26, 2026 at 10:28 pm

    You need to enclose each of your && conditions within parentheses.

    if (i.StartsWith("+") && i.EndsWith(nick)) 
    || (i.StartsWith("%") && i.EndsWith(nick)) 
    || (i.StartsWith("@") && i.EndsWith(nick)) 
    || (i.StartsWith("&") && i.EndsWith(nick)) 
    || (i.StartsWith("~") && i.EndsWith(nick)))
    {
        Roll_Args(nick, args[1], args[2]);//If above is correct, roll the the command
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How could I write code to get all the action names from a controller
Using the C# compilers query comprehension features, you can write code like: var names
I am trying to write a multi channel application in socket.io. The channel you
Given a python class class Student(): and a list names = [] ; then
I added a database writer destination to a working mirth channel. The destination is
I'm trying to write a simple function to construct field names for a form.
Using GraphicsMagick to read in a PNG file and write it out under a
I'm trying to write a named scope that will order my 'Products' class based
i write some utility class but how to get name ? Can that send
I try to write KSH script for processing a file consisting of name-value pairs,

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.