Basic Python IRC Bot
Based on what I see in the tutorial, I’m guessing ircmsg is just a string. If so, in that tutorial they’re looking for a substring and then calling the function hello. To find the parts of the string that you’re looking for, you need to parse the string yourself. For example, you can split the string by spaces and then take the needed parts and give them as arguments to functions:
Code:
>>> msg = "hello world"
>>> splits = msg.split(' ')
>>> splits[0]
'hello'
>>> splits[1]
'world'
>>>
So if splits[0] is ‘hello’, then you can call the function hello(splits[1]). But keep in mind that this is a very basic way of parsing as it’s not guaranteed that the user will type in the correct number of arguments. You should actually check that before calling any functions.

