question

Started by kokia, Aug 14, 2015, 03:30 AM

Previous topic - Next topic

kokia

hello guys is there any way to check that if in the line at the end there is a question mark? like 8ball cmd has in #vu, n other thing, is there any way to check weather from bots? like !weather <city> i have seen most of the bots having this command, please tell me how? and another thing whenever i type /nick kokia it says : Services reserved nickname: Registered nickname.help me

Thijn

VUBot isn't made in Squirrel, so let's get that straight :)

A question mark can be checked by using if ( text.slice(-1) == "?" ).
A weather command is a bit more complex then that, since you'd need to get it from somewhere. In other words, you need to make a HTTP request using sockets, and then parse the response which is probably XML. There's about 1 example on this forum that explains the sockets, and you could check out the wiki for some explanation for the different functions.

The registered nickname means you probably send your password wrong too many times. You can fix this by using /ns recover Kokia <password>. After that you should be able to change back to your nick.

kokia

now the problem is when i type a question it says a question please when i dont enter question mark it gives answer.
in the wiki the socket thing is not finished, i cant find anything in example!!!!!
!
!
!
!

!
!
!

!
!
!

!

Thijn

Like I said, search the forum.
Post your code, you probably reversed your if statements.